peers / peerjs

Simple peer-to-peer with WebRTC.
https://peerjs.com
MIT License
12.38k stars 1.43k forks source link

Works on wifi but fails over cellular #1287

Open wcroachie opened 3 months ago

wcroachie commented 3 months ago

Please, check for existing issues to avoid duplicates.

What happened?

Works fine when "host" peer and "client" peers exchange data via data connection over wifi, but fails when 1 is on wifi and 1 is on cellular. Tried using 0.peerjs.com and 1.peerjs.com, tried enabling/disabling "secure" config flag, no dice. I did see some older, similar issues from a few years ago but they appeared to be closed and I'm not sure how to/if it is possible to reopen them

How can we reproduce the issue?

What do you expected to happen?

For it to connect like it does over wifi

Environment setup

device A:

Is this a regression?

No response

Anything else?

No response

loethen commented 3 months ago

@wcroachie Hey bro, today I also encountered issues with cellular network and WiFi, but I managed to solve them. I came across a four-year-old issue where he used stun and turn servers provided by https://www.twilio.com/docs/stun-turn. I solved it the same way, so hopefully it helps you too. I think it might be an issue with the default stun and turn servers provided by the PeerJS server.