potential regression in nip42 auth? I connect to a single relay that immediately sends an auth challenge, presumably after the home feed req gets is fired. home feed doesn’t ever load and I have to go to a profile view to get notes flowing 🤔

no change to my relay setup. just started seeing this behavior after the tf update. https://video.nostr.build/2738b92a3d0ba2539ee4add40f237bb1ce57b6ccceb056140f04e76576114b1d.mp4

Reply to this note

Please Login to reply.

Discussion

Not new for me. Sometimes it works sometimes it doesn’t depending on race condition. Does not retry any REQs closed before AUTH.

https://github.com/damus-io/damus/issues/1914

sounds like my experience too!

having done a bit of work on how these things are supposed to work, based on what nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 put into go-nostr with the relay websockets and client websockets from nostr-sdk there is a signal channel in the websocket that closes when it gets an auth-required prefix in the OK and what is supposed to happen is then whatever the client is doing, it should stop, sign an auth, and then wait

the relay is then supposed to do the same thing on the other side, waiting for ~5 seconds or so, for the auth response to come back, and then continue processing the REQ

i think this is a harder algorithm to code in javascript than in Go, and probably harder to code in almost every other language because async != concurrent != parallel

in javascript, at least, i think that you need to have some sort of promise thing that it opens up that triggers when the websocket receives the auth-required and that should trigger the signing process, and then you have to have some kind of sync to tell the client to wait on the request

i have no idea how anyone does it with strfry because it doesn't have auth built into it, the dreadful state of auth in nostr is largely due to nobody having written a decent auth routine on the relay that anyone uses, because evyrone is all strfrystrfry which has not been updated in months and probably abandoned

so, anyhow, gib zaps so i can focus on making a good relay 😁

btw, the lack of Go is probably part of why auth hasn't been fixed yet, it requires concurrency or complex logic in both sides of the equation

sir are you an ai bot? this is a problem on the damus client which has nothing to do with go or JavaScript.

I will not zap you, my relay works fine thanks.

sir, it's called touch typing

i assume that you haven't changed your relay code or updated it also concurrently with the regression, just checking, because i know it's easy to forget the billion things that go into an application... right now fighting with some json string escaping nonsense

reverted to 1.7(11) and home feed loads straight away

I got lucky with that video and loading the home feed. haven’t been able to win the race again so had to revert to get a usable app.

nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s if you want an easy repro, lmk and ill add your pubkey to my relay whitelist. just connect and you’ll hit the issue.

I didn’t add this feature and I don’t use auth, I am hoping someone will care enough to fix it.

I can’t bring myself to contribute code to the ios client. hopefully my year of damus purple can help incentivize the fix. the latest release renders damus unusable for me configuration.

We are adding a purple relay with auth so this will come with auth fixes and longterm auth support.