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

libp2p-in-the-browser WebRTC discovered peers not connecting #621

Closed
AustinFoss opened this issue Apr 29, 2020 · 1 comment
Closed

libp2p-in-the-browser WebRTC discovered peers not connecting #621

AustinFoss opened this issue Apr 29, 2020 · 1 comment

Comments

@AustinFoss
Copy link

AustinFoss commented Apr 29, 2020

  • Version: 1.0.0
  • Platform: Brave Browser v1.5.112 (Chromium 80.0.3987.132) & FF v75.0
  • Subsystem: Linux Ubuntu 18.04 x86-64bit

Type: Question

Severity: Low

Description: WebRTC discovered peers not connecting or ping-able

Steps to reproduce the error: Using NodeJs --version 12.16.1, in a freshly cloned js-libp2p directory, got to libp2p-in-the-browser example and follow directions in the Read Me, then open two tabs. If you want to make it easier to see the problem comment out lines 7, 16, & 20-30, removing the bootstrapped peers.

You will now be able to see the other browser's PeerID appear under each tab's respective PeerID but not the following connected output to each window as with the previously bootstrapped peers.

By calling the following function after line 54(within libp2p.on('peer:discovery'...) ):
async function ping(peerInfo) { console.log(await libp2p.ping(peerInfo)) }

and passing the peerInfo object emitted by the discovery event you get an error in the browser console after waiting for a while.

Uncaught (in promise) AggregateError: Error: The operation was aborted at AbortSignal.onAbort (http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:118278:14) at AbortSignal.onAbort (http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:50502:16) at AbortSignal.onAbort (http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:50502:16) at AbortController.abort (http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:50467:18) at http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:50459:38 at timerWrapper (http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:47986:16) at maybeSettle (http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:46817:14) at http://localhost:1234/libp2p-in-the-browser.e31bb0bc.js:46855:27

@jacobheun
Copy link
Contributor

Closing this as it should no longer be an issue in the latest version.

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

2 participants