-
Notifications
You must be signed in to change notification settings - Fork 446
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
ambient peer discovery in the browser #1865
Comments
Getting an error when calling pubsub.publish
Looks like RPC is undefined. Probably due to bundler? |
Most of the pubsub mesh issue was due to the bundler resolving However the passive peer discovery is still not working for the circuit-relay topology. Also seeing one side of pubsub not seeing the remote subscriber. |
I was trying to get browser peers to discover eachother for a really long time during the last hackFS, never was successful. Seeing this issue pop up makes me feel less like I was shooting myself in the foot, so thank you. I forked your repro and added some simple GUI: https://github.com/bradwbradw/libp2p-pubsub There's two instances of libP2P, both available in You can see, for each instance: the self peer ID, the peer store, and a list of peers that have been discovered My system: Also unable to see the peers discover eachother via the relay node. I would expect to see two peers in the peer store and in the discovered peers list. But only seeing itself. Also want to point out, there is some kind of race condition whereby starting and stopping the relay server / refreshing the browser window using different timings causes a crash, but it's pretty hard to reproduce reliably: When it is reproduced, refreshing the browser consistently shows the crash. Restarting the relay server can fix it. (note: I had a larger post before but found that most of the notes I made were just to do with how libp2p was being integrated into React. In the current state react is happy with no linting warnings, and it's behaving quite consistently, and React.StrictMode is off. I did get it to discover the other peer at one point while thrashing about in the code but I haven't been able to get that state back.) |
Working fine for me now, must have been doing something wrong. |
Thanks for following up @tabcat :) @bradwbradw I took a look at your peer discovery config and I noted that you're using gossipsub but with no configuration, to avoid going into the complexities of gossipsub, have you tried seeing if you are able to discover peers using a bootstrap node and then connect that way? You can take a look at this example as a starting point, but I think the issue @tabcat raised is unrelated to what you are trying to solve. If you are still having problems after trying that, feel free to open an new issue using our issue template |
@bradwbradw turning on debug logs for circuit-relay helped |
Severity: High
Description:
Clients are not discovering each other passively. After connecting them manually and subscribing to the same pubsub topic; peers become pubsub peers but never add each other to the topic mesh.
Steps to reproduce the error:
https://github.com/tabcat/libp2p-pubsub
The text was updated successfully, but these errors were encountered: