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

Never finds peers using Bugout.js #2

Closed
hhff opened this issue Apr 7, 2021 · 3 comments
Closed

Never finds peers using Bugout.js #2

hhff opened this issue Apr 7, 2021 · 3 comments

Comments

@hhff
Copy link

hhff commented Apr 7, 2021

Hi Draeder!

Thank you so much for this. I left a note here: chr15m/bugout#43 (comment)

But felt it might make more sense to open the discussion here instead.

When I use this code:

var b = new Bugout("foo.bar", {"announce": ["wss://my-deployment.herokuapp.com"]});

My Bugout instance never finds any peers. Remove the "announce" option, (and refreshing until I actually do get a connection to wss://hub.bugout.link) does work as expected.

Am I missing any steps you took to get this working on your end? :)

@draeder
Copy link
Owner

draeder commented Apr 7, 2021

@hhff There really shouldn't be any steps other than deploying the instance to Heroku using the deploy button, then using the app URL as your tracker in Bugout. Are you seeing the start message in the Heroku logging when a client tries to connect? If not, it means that your Bugout announcement is never making it to the tracker server.

@draeder
Copy link
Owner

draeder commented Apr 7, 2021

@hhff I just tested my instance of p2p tracker in Heroku with Bugout and everything seems to be working.

Just to be clear, you are launching your code with the bugout identifier twice, correct (e.g. if using the browser, you'd have two browser tabs; if using node.js, you'd have two node servers running [or one node server with one browser session]? Remember that your first instance is the announcement that there is a bugout instance available, the second instance finds that bugout instance and connects peers through the tracker.

In the Heroku logs for your p2p-tracker deployment you should see something similar to this, for each session:

2021-04-07T23:16:48.118348+00:00 app[web.1]: got start message from 2d5757303030372d2f487930744e387964446a6d
2021-04-07T23:16:56.852794+00:00 app[web.1]: got start message from 2d5757303030372d716b664478484d6e4d4f634e

@hhff
Copy link
Author

hhff commented Apr 8, 2021

Hi @draeder thank you so much for the fast response!

I just tested this a second time, and magically, it's now working. Not sure what was the issue the first time around, but anyhow, thank you for this!

@hhff hhff closed this as completed Apr 8, 2021
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