Closed fsvieira closed 2 years ago
Triage notes: @fsvieira Could you provide us with logs when this happens? Please also set DEBUG=libp2p:*
Hi, this is the log from my nodejs node
`
libp2p-in-node@1.0.0 start /media/fsvieira/Data/fsvieira/sandbox/libp2p-repo/js-libp2p-webrtc-star-example/node DEBUG=libp2p:* node index.js
Starting libp2p...
libp2p:connection-manager options: {"maxConnections":null,"minConnections":25,"maxData":null,"maxSentData":null,"maxReceivedData":null,"maxEventLoopDelay":null,"pollInterval":2000,"autoDialInterval":10000,"movingAverageInterval":60000,"defaultPeerValue":1,"autoDial":true} +0ms
libp2p:transports adding WebSockets +0ms
libp2p:transports adding WebRTCStar +0ms
libp2p:transports adding Circuit +1ms
libp2p:peer-store:proto-book added provided protocols for QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 +0ms
libp2p:peer-store:proto-book added provided protocols for QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 +1ms
libp2p:peer-store:proto-book added provided protocols for QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 +0ms
libp2p:transports creating listener for WebRTCStar on /ip4/127.0.0.1/tcp/13579/wss/p2p-webrtc-star +8ms
libp2p:webrtc-star:listener Dialing to Signalling Server on: http://127.0.0.1:13579 +0ms
libp2p:peer-store:address-book stored provided peer record for QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 +0ms
libp2p:connection-manager started +48ms
libp2p started!
libp2p id is QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7
libp2p:webrtc-star Peer Discovered: /ip4/127.0.0.1/tcp/13579/wss/p2p-webrtc-star/p2p/QmUh9pHprV2z4zTjNfnzt4Y62tsqsDv3uqUZjNrfWF5Gci +0ms
libp2p:peer-store:address-book added provided multiaddrs for QmUh9pHprV2z4zTjNfnzt4Y62tsqsDv3uqUZjNrfWF5Gci +3s
Found peer QmUh9pHprV2z4zTjNfnzt4Y62tsqsDv3uqUZjNrfWF5Gci
libp2p:dialer 1 tokens request, returning 1, 99 remaining +0ms
libp2p:webrtc-star dialing 127.0.0.1:13579 +21ms
libp2p:connection-manager checking limit of maxEventLoopDelay. current value: 1.2256309999997939 of Infinity +4s
libp2p:webrtc-star:listener new inbound connection undefined +5s
libp2p:upgrader Starting the inbound connection upgrade +0ms
libp2p:upgrader handling inbound crypto protocol selection [ '/noise' ] +1ms
libp2p:upgrader encrypting inbound connection... +12ms
libp2p:noise Stage 0 - Responder waiting to receive first message... +0ms
libp2p:noise Stage 0 - Responder received first message. +6ms
libp2p:noise Stage 1 - Responder sending out first message with signed payload and static key. +1ms
libp2p:noise Stage 1 - Responder sent the second handshake message with signed payload. +12ms
libp2p:noise Stage 2 - Responder waiting for third handshake message... +1ms
libp2p:noise Stage 2 - Responder received the message, finished handshake. +17ms
libp2p:upgrader inbound handling muxers [ '/mplex/6.7.0' ] +57ms
libp2p:upgrader Successfully upgraded inbound connection +2ms
libp2p:upgrader inbound: starting new stream on [ '/ipfs/id/1.0.0' ] +1ms
libp2p:mplex new initiator stream 0 0 +0ms
Connected to QmUh9pHprV2z4zTjNfnzt4Y62tsqsDv3uqUZjNrfWF5Gci
libp2p:peer-store:key-book stored provided public key for QmUh9pHprV2z4zTjNfnzt4Y62tsqsDv3uqUZjNrfWF5Gci +0ms
libp2p:connection-manager checking limit of maxConnections. current value: 1 of Infinity +1s
libp2p:webrtc-star:listener inbound connection undefined upgraded +75ms
libp2p:identify:err ReferenceError: AbortController is not defined
libp2p:identify:err at module.exports (/media/fsvieira/Data/fsvieira/sandbox/libp2p-repo/js-libp2p-webrtc-star-example/node/node_modules/libp2p-mplex/src/stream.js:25:27)
libp2p:identify:err at Mplex._newStream (/media/fsvieira/Data/fsvieira/sandbox/libp2p-repo/js-libp2p-webrtc-star-example/node/node_modules/libp2p-mplex/src/mplex.js:130:20)
libp2p:identify:err at Mplex.newStream (/media/fsvieira/Data/fsvieira/sandbox/libp2p-repo/js-libp2p-webrtc-star-example/node/node_modules/libp2p-mplex/src/mplex.js:86:17)
libp2p:identify:err at Connection.newStream [as _newStream] (/media/fsvieira/Data/fsvieira/sandbox/libp2p-repo/js-libp2p-webrtc-star-example/node/node_modules/libp2p/src/upgrader.js:260:35)
libp2p:identify:err at Connection.newStream (/media/fsvieira/Data/fsvieira/sandbox/libp2p-repo/js-libp2p-webrtc-star-example/node/node_modules/libp2p-interfaces/src/connection/connection.js:175:45)
libp2p:identify:err at IdentifyService.identify (/media/fsvieira/Data/fsvieira/sandbox/libp2p-repo/js-libp2p-webrtc-star-example/node/node_modules/libp2p/src/identify/index.js:168:41)
libp2p:identify:err at ConnectionManager.
On the browser I just have my messages, like this:
libp2p started! libp2p id is QmUh9pHprV2z4zTjNfnzt4Y62tsqsDv3uqUZjNrfWF5Gci Found peer QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 Connected to QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 Disconnected from QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 Connected to QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7 Disconnected from QmPFADEtgi1v8FuSqYLhGSMnoCzERfTA3JcbBVEFdmgsq7
Thanks.
Interesting, AbortController is not defined
. @fsvieira which nodejs version are you running?
Oh, you are right it was my node version, I was using v14.18.1, I tested it now with v16.14.0, and it works great. I completed forget that I add this version as default. Thank you so much for the help.
Hi,
I am trying to connect browser nodes and nodejs nodes using webrtc-start, I am able to connect browser-to-browser, nodejs-to-nodejs, but when a browser node connects with a nodejs node and vice-versa, it immediately disconnects
I took the code from here GitHub - HighCWu/js-libp2p-webrtc-star-example, I also tried to run webrtc-signalling-server on my own computer, but it didn’t solve the problem.
How can I solve this ? Thanks.