moose-team / friends

:tv: P2P chat powered by the web.
http://moose-team.github.io/friends/
MIT License
3.17k stars 341 forks source link

Connected to 0 peers #156

Open hsribei opened 8 years ago

hsribei commented 8 years ago

Hi! Just trying to run friends for the first time. Started it fine, but I'm still "connected to 0 peers" and I see no way of finding an initial set of peers. Do I have to set that up somewhere? Thanks!

ungoldman commented 8 years ago

It's quite possible that no one else is on the network :(

hsribei commented 8 years ago

So it is a single network that everyone connects to? How does peer discovery work? Could it be some NAT traversal issue?

ungoldman commented 8 years ago

The logic is here: https://github.com/moose-team/friends-swarm/blob/master/swarm.js. Sorry the repo is not very well documented. Short answer is WebRTC swarm (https://github.com/mafintosh/webrtc-swarm) plus a signal hub (https://github.com/mafintosh/signalhub).

hsribei commented 8 years ago

Great, thanks for the refs. I guess there's no actual error, will just lurk longer :)

wking commented 8 years ago

On Mon, Mar 07, 2016 at 09:52:10AM -0800, Helder Ribeiro wrote:

I guess there's no actual error, will just lurk longer :)

I'd had this problem earlier as well. Since @obvio171 is presumably lurking, I thought I'd fire up friends locally and see if I could connect to him, but I'm also seeing “0 peers”. Looking at the network logs, it looks like the only requests my instance is making is to GitHub (for my user and avatar). Should I be seeing a request to https://github.com/mafintosh/signalhub in there?

hsribei commented 8 years ago

Ok, I thought I wasn't seeing anyone because no one else was using it, but I just tested it live with @virgilio and we both had 0 peers and couldn't see each other's messages. How can we go about debugging this?

somebody1234 commented 8 years ago

@wking Mafintosh's signalhub is still up.

rschulman commented 8 years ago

I'm seeing the same issue, though I don't know if anyone else is trying to use friends right now. Happy to help out in debugging if I can in any way.

hemanth commented 8 years ago

No one is active these days?

screen shot 2016-04-25 at 11 25 13 am
bnolan commented 7 years ago

😿

billiegoose commented 7 years ago

So it is pretty lonely on the #friends channel, which is a shame since it was so hard to compile and install. 😝 I spent the day dockerizing peerbot with the intention of leaving one or two around on a free webservice. Unfortunately, the peer-to-peer thing has some feisty networking curiousness and I could only get it to work if I used docker run --net=host which probably precludes it from working in shared hosting environment. I'm currently running it on one of my existing DigitalOcean droplets.

image

I'm hoping that as long as one peer (the peerbot) is always online, the message history will be preserved. Is that assumption correct?

ungoldman commented 7 years ago

@wmhilton yes, message history is preserved and gossiped exclusively between peers. no peers, no history. so peerbot can act as a sort of chanserv / channel history server peer.