iceConnectionState goes from *checking* to *failed*

Both clients connect to the signalling server on the phone and exchange the offer, answer and ICE candidates, but then the iceConnectionState goes from checking to failed and the streams don’t get exchanged.

Me too Im having this issue as well did you get some solution?

@tiffanym19 @rahulb any update?
I’m facing the same issue.

Check that the STUN and TURN servers are functioning correctly.
Also make sure you have both.

Any solution for this issue? I am having the same issue in Android Simulator, trying connecting with other Peer using the web (Chrome), but no matter what I tried, the always status keeps checking > fail… I just need to use DataChannel so my configuration is…

I am using peerConstraints = {iceServers: [{urls: ‘stun:stun.l.google.com:19302’}]};
and offerConstraints = {offerToReceiveAudio: false, offerToReceiveVideo: false};

Responded over here.
For future reference.

In the repo, they said I have to set both STUN and TURN server, do you have some example of how to config it correctly… I am using the next config but the same error, my react-native app can’t reach the web app… This is the web version https://transpher.xyz/ if you want to check it… between webs are working well, but I also want to give support to Android TV for that reason I am creating a react-native app… Thanks…

peerConstraints = {iceServers: [
            { url: 'stun:stun.l.google.com:19302' },
            { url: 'stun:stun1.l.google.com:19302' },
            { url: 'stun:stun2.l.google.com:19302' },
            { url: 'stun:stun3.l.google.com:19302' },
            { url: 'turn:numb.viagenie.ca', credential: 'muazkh', username: 'webrtc@live.com' },
            { url: 'turn:relay.backups.cz', credential: 'webrtc', username: 'webrtc' },
            { url: 'turn:relay.backups.cz?transport=tcp', credential: 'webrtc', username: 'webrtc' },
            { url: 'turn:192.158.29.39:3478?transport=udp', credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=', username: '28224511:1379330808' },
        ]
    };

Might want to redact the TURN server credentials and also change them to prevent abuse.
Also please refer to here.
You should be using urls instead of url.

As for Android TV… i’m not entirely sure about how well that is supported.
If you can provide logs then that might help debug.

Faced the same issue …so my setup was something like this …a react native app with react native webrtc on it (client 1) and a desktop client with web rtc …both connected with server on local system… the desktop client was connected with the wifi of mobile(same mobile of client 1) and it was not working …but when i changed the router of both mobile and desktop to another router …state was connected .
I dont want to use turn server .