Digging deeper, it seems to be related to the npub being sent by Pokey to Amber in the "current_user" Intent field for Relay auth. Pokey is sending an empty string which Amber is converting to a hex string and signing the Auth event with, which in turn is being rejected by the Relay, which causes the error. At least *I think so* - because debugging IPC is complicated! When I change the null check in Amber to be isNullOrEmpty() then the error goes away.

Reply to this note

Please Login to reply.

Discussion

That's really interesting, thanks is for you work!! But what I am supposed to send if I'm actually using that request to get the npub?

You're welcome, I've been working on NIP-55 integration for a while so I'm always interested in these edge cases. I think the issue lies in the bogus hex key that Amber generates from the empty npub string. It needs more testing with various pubkeys combinations, but changing the null check in Amber fixes the problem for me. I'm happy to raise an issue, the bug is easily reproducible with the right test keys, the only question is which repo - Pokey, Amber or both?

The issue is in the get public key method pr when hes trying to auth to a relay?

Can you send a pull request to fix the null check?

Let me know if you'd like me confirm that this fix resolves the original problem of auth failing and that "Amber not installed" toast being generated before you publish an updated Amber release.

nostr:nprofile1qqs827g8dkd07zjvlhh60csytujgd3l9mz7x807xk3fewge7rwlukxgpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhszrnhwden5te0dehhxtnvdakz7qgswaehxw309ahx7um5wghx6mmd9usjfpck is tagged in this thread, so let's see what he has to say about it. Awesome debugging work! Nothing gives me the tingles like collaboration! When you say "dud relay" does that mean that the issue ultimately stems from a bad relay defined in Amber?

By "dud relay" I meant a relay specified in the key's relay list which isn't accepting notes, either because the key isn't authorized or there's something wrong with the relay and it's rejecting all messages. Looking at it more deeply, it's possible it's just any relay that requires authorization, so if you have one or more of them on your relay list than that might be what's causing the Amber not found message.

Oh I see. Could it be that one or more of the relays is paid? Because I have two paid relays defined as my outbox relays, and one paid relay defined as my DM Inbox relay.

I'll test it out, I think that updating ExternalSignerLauncher with the pubkey once I got it might solve the thing

I all, I just released a new version, can somebody test it out?

If it's still happening I believe the only option is to apply that change on Amber

I'm not getting the error with the latest build. Passing the pubkey seems to have fixed the issue but I'll still make a PR on the empty string pubkey since Amber should (imho) probably treat it the same as a null value

I just sent a new pull request. It wasnt calling amber with content resolver and it wasnt replying the auth event to the relay

Thanks!

I'm no longer getting the "Amber not installed" error, and looking at my Pokey entry in Amber, a full suite of permissions is now associated. It's looking real good!