Closed ghost closed 6 years ago
My remote connections don’t work, something that I did expect to be honest. I don’t understand why WebRTC doesn’t try to at least open a port on the network to allow communication, this is something that every videogame thst uses voice chat does.
WebRTC is a complex but ineffective protocol.
I have been using this library and it's working fine. As per the WebRTC handshake you need to have TURN not just STUN servers set up and working right.
I am using the turn servers with https://xirsys.com/
var p = new Peer({initiator: location.hash != "#visit", trickle: false, stream: stream, iceTransportPolicy: 'relay', reconnectTimer: 3000, config : { iceServers: JSON.parse(ice_servers)}});
Worked well on one machine, different browsers, didnt work on same/different network, different machines.
After turning off firewall on both machines, it works. This is not how it is supposed to be done. What else do you recommend? Tried TURN/STUN servers, did not work without turning off firewall.
It depends on the configuration of your firewall. You could have set your firewall ruleset to block all traffic completely, or blocked the ports your STUN/TURN servers are on, or blocked UDP traffic. It's impossible to help debug firewall configurations without knowing what they are.
I've pinned my troubleshooting steps to this issue, please follow them and open a new issue with a filtered pcap file if they do not help.
any updates regarding this ?
Review the pinned troubleshooting and open a new, specific issue if those steps do not work for you.
It seems that this problem was not solved yet. I have the same problem, getting Ice connection failed Only when creating video from firefox to chrome (chrome to firefox work great) (I am using simple peer and Angular 7) My observation is this.
This is not a firewall problem. (happen in my network, and I closed all firewall and antivirus This is not STUN TURN problem, I checked the URLs they are all valid, and I used big companies like Twilio and Xirsys both lead to the same error
It might be some chrome timeout after 15 seconds, or problem in the simple peer library, I am not sure I noticed that someone opened a chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=811000 But I checked in later chrome versions the bug was not solved.
Here is some data while debugging the WebRTC
It seems that the problem was when I loaded the IceServer from my server, into the peer object I used a wrong configuration, (did not initiate it properly) now it is working, (although it is not working from chrome using iPhone, I guess this is Apple lack of support in WebRTC, but this is another story...)
Pinned Troubleshooting
This error is caused by a failure to find a viable network route through ICE. The following steps will help you debug common causes of the error.
You have found a bug that is already patched in simple-peer source.
Your STUN or TURN servers are not configured properly.
urls
and noturl
in theiceServers
config.config
object with noiceServers
.There is a problem with your signalling channel.
Your firewall or internet provider is blocking WebRTC traffic.
You have found a new bug, or a rare case we haven't discussed here.
Original Issue