Negotiation of connection to X failed.
When I'm not on the same network the other peer, I get a "Negotiation of connection to [peer name] failed." I've tried this on several networks. Neither computer has a static IP and neither network has a firewall. Any suggestions?
Same problem here, any luck?
Same problem here. But only on cell network on phone. It works on WIFI and computer, desktop. @stevedekorte have you found the issue?
@stevedekorte Same problem for me
Same problem for me. Any updates?
Try to use relay server. Please, leave a comment if it doesn't work for you.
Same issue, on mobile network it did not work for me too. It was working in wifi but not with one peer on wifi and another on 4G network.
Update: As @afrokick suggested the 'relay server' worked for me. Actually its a TURN server which is required which does a packet retransmission via TURN server instead of direct connection like Peer to peer. I actually ended up setting up coturn server in aws EC2 just to test out. It did not work without SSL in coturn, so I created self signed certificate and set up coturn that seemed to work. Not only STUN server alone wont work.
Hi I'm having a similar issue, it some times happens to me when I'm opening a data channel, it works well for media streams, but sometimes the data channel just wont open, I'm using peerjs-server, I wanted to know if despite being using peerjs-server I should use something like coturn? if someone could point me to the right direction it would be very cool, right now I'm at a loss with this.
Hi, let me share my remarks on this.
Just had the following scenarios: A) two peers are in the same LAN (wifi-based) - all works flawlessly B) the listener in LAN (wifi), the caller in mobile network - does not work (out of the box)
Chrome reported no errors, but FF said "WebRTC: ICE failed, your TURN server appears to be broken, see about:webrtc for more details" which gave me clues where to look for.
Ended up setting up commercial (yet free) TURN service and guess what? It all now works like a dream!
"If direct peer-to-peer connection isn't possible due to firewall or NAT restrictions, the TURN server acts as a relay, facilitating data transfer by relaying media packets between peers" (quoted by GPT); certainly, this is where the cost lays in WebRTC.
Moreover, the (quite decent) PeerJS documentation states in Are there any caveats? point "a small percentage of users are behind symmetric NATs. When two symmetric NAT users try to connect to each other, NAT traversal is impossible and no connection can be made. A workaround is to proxy through the connection through a TURN server. The PeerServer cloud service provides a free TURN server. This will allow your PeerJS app to work seamlessly for this situation".