Comments (7)
I am still seeing this.
In order to aid troubleshooting, how can I determine in JavaScript whether the browser is connected directly to the other browser? Is the other browser listed in the PeerStore or something along those lines?
from universal-connectivity.
In order to aid troubleshooting, how can I determine in JavaScript whether the browser is connected directly to the other browser? Is the other browser listed in the PeerStore or something along those lines?
So in the UI we display info about the transports for connections so that should indicate if a node is connected via webRTC.
This issue may be fixed in v2.0.10 @DougAnderson444 would you be interested in upgrading the webrtc dep and seeing this issue still exists?
from universal-connectivity.
Ok I will take a look at the multiaddrs there, but last I checked was still seeing the issue even with 2.0.10
from universal-connectivity.
I have been troubleshooting this a little bit, and have narrowed it down to a gossipsub issue. It has nothing to do with UV, IPv6 or WebRTC itself.
Once the relay is dropped, the gossipsub also seems to fail for some reason
I've raised an issue here ChainSafe/js-libp2p-gossipsub#448
and a repro here https://github.com/DougAnderson444/libp2p-gossipsub-browser-to-browser
from universal-connectivity.
@DougAnderson444 Thanks for looking into this. Just to confirm, when you isolated to gossipsub, there was a webrtc
browser to browser connection established right?
from universal-connectivity.
Yes correct. What happens is we still see the /echo/
messages passed back and forth without the relay, but no longer gossipsub
passed back and forth. That's how we know it's a gossip issue and not WebRTC.
I wonder if gossipsub in javascript is looking for either Kad peers or perhaps Server style gossipsub? Which we wouldn't get with the browsers. I don't have a deep enough understanding of how the js-gossipbsub inner workings happen to figure that out
from universal-connectivity.
I think I may have mentioned this in a different thread, so apologies if I am posting twice. However, I've run into this same issue and I found that GossipSub is ignoring all 'subsequent' connections to a Peer. So, if you allow it to connect on CircuitRelay, it will never connect on WebRTC. See this logic:
https://github.com/ChainSafe/js-libp2p-gossipsub/blob/master/src/index.ts#L745
There is a change that was just applied to libp2p master yesterday that prevents GossipSub (and most other protocols) from connecting over CircuitRelay, so this effectively works around the issue of GossipSub limiting/locking itself to the first connection per peer.
libp2p/js-libp2p@a1ec46b
I believe I am also seeing some issues with GossipSub re-connecting after a disconnection, but I am still investigating that. It could be an issue with the CircuitRelayTransport and I haven't ruled that out.
from universal-connectivity.
Related Issues (20)
- License? HOT 1
- In React, Uncaught Error: Cannot find module 'interface-datastore/key'
- Compiling rust-peer to wasm HOT 1
- Create a tutorial HOT 4
- Make this app discoverable
- Support sending files HOT 9
- Upgrade to js-libp2p 0.45.0 HOT 3
- Example using circuit relay HOT 1
- browser-to-browser connectivity with webRTC and pubsub (gossipsub) HOT 4
- Update to Rust v0.52
- Enable dependabot HOT 1
- Create a CODEOWNERS file HOT 2
- JS: update stream mgmt in the new way refactored
- JS: use js-libp2p-logger instead of `console.log`
- Add a Rust WASM peer? HOT 2
- Rust: Allow for stable identities that don't depend on the file-system HOT 1
- Help js browser peers discover each other out of the box HOT 19
- Go build error HOT 3
- Add CI for Go Peers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from universal-connectivity.