Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to lnbits relay: 403 Forbidden #278

Open
jjim1982 opened this issue Oct 14, 2024 · 0 comments
Open

Cannot connect to lnbits relay: 403 Forbidden #278

jjim1982 opened this issue Oct 14, 2024 · 0 comments

Comments

@jjim1982
Copy link

I'm running an lnbits relay at wss://zap.minestr.app/nostrrelay/test for testing. It works fine with clients and I can connect and fetch events using nostr-tools library. However when I try to connect with ndk, I get 403 Forbidden. Is there something specific I need to do to be able to connect to this relay using ndk? I'm using Caddy and I don't think I need any directives in it for my relay (since it works ok with other clients etc.), but maybe this is where I'm going wrong. Any help much appeciated.

`ndk:pool:main Connecting to 1 relays, timeout 6000... +0ms
ndk:relay:wss://zap.minestr.app/nostrrelay/test:connectivity535 WebSocket error on wss://zap.minestr.app/nostrrelay/test/: ErrorEvent {
type: 'error',
bubbles: false,
cancelable: false,
error: Error: Server responded with a non-101 status: 403 Forbidden
Response Headers Follow:
alt-svc: h3=":443"; ma=2592000
content-length: 0
content-type: text/plain
date: Mon, 14 Oct 2024 01:19:24 GMT
server: Caddy

  at WebSocketClient.failHandshake (/Users/chris/Github/whatsmyaddy/node_modules/websocket/lib/WebSocketClient.js:339:32)
  at ClientRequest.<anonymous> (/Users/chris/Github/whatsmyaddy/node_modules/websocket/lib/WebSocketClient.js:278:18)
  at ClientRequest.emit (node:events:514:28)
  at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
  at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
  at TLSSocket.socketOnData (node:_http_client:535:22)
  at TLSSocket.emit (node:events:514:28)
  at addChunk (node:internal/streams/readable:545:12)
  at readableAddChunkPushByteMode (node:internal/streams/readable:495:3)
  at Readable.push (node:internal/streams/readable:375:5),

message: 'Server responded with a non-101 status: 403 Forbidden\n' +
'Response Headers Follow:\n' +
'alt-svc: h3=":443"; ma=2592000\n' +
'content-length: 0\n' +
'content-type: text/plain\n' +
'date: Mon, 14 Oct 2024 01:19:24 GMT\n' +
'server: Caddy\n',
target: WebSocket {
listeners_: HashMap { data_: [MapElementList], buckets_: [MapHashBuckets] },
created_at_: 2024-10-14T01:19:23.359Z,
on_: {
open: [Function: bound onConnect],
close: [Function: bound onDisconnect],
message: [Function: bound onMessage],
error: [Function: bound onError]
},
state_: 3,
client_: WebSocketClient {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
config: [Object],
_req: null,
protocols: [],
origin: undefined,
url: [Url],
secure: true,
base64nonce: 'Wqj5eU7O7aRvX4a1PveIDA==',
[Symbol(kCapture)]: false
}
},
timeStamp: 662
} +0ms
ndk:relay:wss://zap.minestr.app/nostrrelay/test:connectivity535 Error connecting to wss://zap.minestr.app/nostrrelay/test/ 6000 +5s
ndk:relay:wss://zap.minestr.app/nostrrelay/test:connectivity535 Reconnecting in 10000 +1ms
ndk:relay:wss://zap.minestr.app/nostrrelay/test:connectivity535 Relay requested to be connected but was in state 2 or it had a reconnect timeout +10s`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant