cody on Nostr: This issue is caused by calling `relay.auth()` twice in quick succession. Since both ...
Published at
2025-03-17 03:05:10Event JSON
{
"id": "4b58940fe291c25238d9585162f4d285b28667bdda1e54734a6cec9315b7d981",
"pubkey": "8125b911ed0e94dbe3008a0be48cfe5cd0c0b05923cfff917ae7e87da8400883",
"created_at": 1742180710,
"kind": 1,
"tags": [
[
"t",
"l251"
],
[
"e",
"00003b2e6c99ea8094674a733f5e1685cb3a035ee66a5a8eec83c44a6c3db0ec",
"wss://nostr.wine/",
"root",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"client",
"jumble"
]
],
"content": "This issue is caused by calling `relay.auth()` twice in quick succession. Since both auth events were signed within the same second, they are identical. Looking at the nostr-tools source code, I found that this prevents the first `relay.auth()` call from ever returning.\n\nI'll find a way to avoid consecutive calls to `relay.auth()`, but it might be better to modify nostr-tools to handle this properly.\n\nhttps://github.com/nbd-wtf/nostr-tools/blob/9a612e59a254fd2fb54127073051ac47031858d1/abstract-relay.ts#L251",
"sig": "9ddbe59fed18e9f464da39c85eda9140bd63336a75d21234b79c09659c35ce02360b5984d5da5dbc3e0a08dc78c57a4d3d85abb4723f57d504eb000e384bb079"
}