Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ice connection fails, how can I know what is wrong? #4

Open
Ijatsu opened this issue Sep 4, 2014 · 7 comments
Open

Ice connection fails, how can I know what is wrong? #4

Ijatsu opened this issue Sep 4, 2014 · 7 comments

Comments

@Ijatsu
Copy link

Ijatsu commented Sep 4, 2014

Hi!

I have an application using the latest version RTCMultiConnection and it works well with most person I test it with.

But with some people, the Ice negotiation just fails, giving me the RTCMultiConnection error "ICE connectivity check is failed. Renegotiating peer connection."

Is there a way to know what is wrong?

Thanks.

EDIT: I have tested some online demo of webrtc with these persons and it works without problem. ;(

@muaz-khan
Copy link
Owner

I've faced similar issues whilst testing on the same network. However, onfailed event is fired only when, either both ICE-Agent and ICE-server missed to prioritze valid addresses/ports or failed to perform connectivity checks (STUN-binding-requests) or skipped subsequent STUN servers when first URI is down or failed to fire end-of-candidates gesture.

(Known Bug) Chrome seems taking first STUN-server for ice-trickling, and it skips all others (in the moment). So, XirSys' STUN server (ports 443/80) is skipped in current chrome builds; and hopefully it'll be fixed in M39.

I don't think it is an issue in RTCMultiConnection code, because second try always succeeds for such cases. Remember, getExternalIceServers must be true, or at least you should be using your own xirsys account.

connection.onfailed = function(event) {
    event.peer.getConnectionStats(function(result) {
        // read more here, https://cdn.webrtc-experiment.com/getConnectionStats.js
        // result.connectionType
        // result.audio --- for audio tracks
        // result.video ---- for video tracks
    });
    // use `redial` method
    // it is same as: connection.peers[event.userid].redial();
    event.peer.redial();

    // you can even use `renegotiate`
    // event.peer.renegotiate();
};

// or
// connection.autoReDialOnFailure = true;

P.S. Failure in ice-connectivity check isn't the only reason for onfailed event to be fired, there can be delay in signaling to negotiate offers, and many other factors.

@webleb
Copy link

webleb commented Apr 19, 2022

@muaz-khan
Hi Muaz Khan
i am facing similar problem and you are right , it success from second try ,till here i am able to find a solution but after some times some users are disconnected for some reason and the console show error
i think there is a problem in signal server.

@webleb
Copy link

webleb commented Apr 19, 2022

@muaz-khan
this issue appear while you are on same network using wfi or on different network

@webleb
Copy link

webleb commented Apr 19, 2022

@muaz-khan
onfailed event is not fired also

@webleb
Copy link

webleb commented Apr 19, 2022

@muaz-khan
waiting your reply

@Ijatsu
Copy link
Author

Ijatsu commented Apr 19, 2022

Stop flooding.

@webleb
Copy link

webleb commented Apr 19, 2022

did you solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants