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

Unchaught Error: Connection failed (webrtc-star) #662

Closed
oed opened this issue Jun 10, 2020 · 1 comment · Fixed by libp2p/js-libp2p-webrtc-star#224
Closed

Unchaught Error: Connection failed (webrtc-star) #662

oed opened this issue Jun 10, 2020 · 1 comment · Fixed by libp2p/js-libp2p-webrtc-star#224
Assignees
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up status/in-progress In progress

Comments

@oed
Copy link

oed commented Jun 10, 2020

Type: Bug

Severity: Medium

Description:

While running an ipfs node with a webrtc-star server configured often an Unchaught Error: Connection failed is often thrown. This error occurs if you're using a VPN and try to connect to a browser peer on the same machine. However it also seems to occur when you're unable to connect to peers in other (unknown) scenarios.

Screenshot 2020-06-10 at 13 50 29

It would perhaps be good to have a way to silence these error by setting a log level somewhere. Users don't strictly need to know if a connection to a random peer has failed for whatever reason.

Steps to reproduce the error:

Simply use the html file provided here: https://gist.github.com/oed/8cdabbc75db2a544c46598d065fbc125

For reference: ipfs/js-ipfs#2508

@jacobheun jacobheun added kind/bug A bug in existing code (including security flaws) exp/novice Someone with a little familiarity can pick up P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked labels Jun 10, 2020
@jacobheun
Copy link
Contributor

Error handling needs to get added / cleaned up in libp2p-webrtc star. In particular, this error is being thrown and uncaught because we're not listening for errors on inbound connections, https://github.com/libp2p/js-libp2p-webrtc-star/blob/v0.18.3/src/listener.js#L56. The underlying Duplex stream is throwing since there is no error listener, it needs to be added so we can log the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up status/in-progress In progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants