Open Powersource opened 4 years ago
Code is here https://github.com/ssbc/patchwork/pull/1068/files
Ok hmm, now I think the message has been gossiped but I'm still getting the same error.
Ok looked in the server process logs and found this
WebSocket connection to 'wss://localhost/between-two-worlds.dk:8989' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
and the invite looks partly like this ...a256,,wss:between-two-worlds.dk:8989~shs:lbocEW...
Does it accidentally turn the wss address into a local relative address or are wss links supposed to look like that?
In my conn.json the links look like ws://asdf...
so I tried changing the invite to look like that and I got this error instead which looks a bit better
WebSocket connection to 'ws://between-two-worlds.dk:8989/' failed: Connection closed before receiving a handshake response
Am I wrong in assuming ws==wss? And could the invite looking like this be a bug in browser-demo (where I generated the invite) @arj03 ?
@Powersource wss is web sockets over SSL and should be used for between-two-worlds.dk
I have just checked and wss:between-two-worlds.dk:8989~shs:lbocEWqF2Fg6WMYLgmfYvqJlMfL7hiqVAV6ANjHWNw8=.ed25519
works fine from my browser. So maybe something with the patchwork and ssb-ws?
But this wss://localhost/between-two-worlds.dk is all wrong ;) Don't know how that localhost got it there?
As I noted in the other issue, adding //
to the invite so the server's address starts with wss://betw...
instead of wss:betw...
made it work I think
Related https://github.com/ssbc/multiserver/issues/58 , I think
(sorry for the bad stacktrace, electron really doesn't want me to copy paste it properly apparently) (also the
failed to use invite:
part is mine, the{}
is theerr
from peer-invites)The most likely reason for this error is that the invite msg is still only in the inviter's db (I created it using browser stuff and the replication is a bit inconsistent there) and I guess at least the pub needs to have the msg for this not to error. It makes sense that it errors but a more clarifying error would be nice (especially as we'd show that to users).