Call is freezing on demo.mediasoup.org

I am using mediasoup on my server. But my call gets frozen after 20 or 30 seconds. I have tested it on demo.mediasoup.org and the same thing is happening there as well.
I have tried with different internet connections. I have tried it on different devices. Sometimes it works fine. Here is the video explaining about this error in more details:

I’m afraid this is something related to your network or ISP.

I have tried different internet connections. in different cities. I have to use skype or zoom as alternative. Which always work fine. Its been more than 3 months I am having this issue. I have debugged on my side. used different computers. different nets, landline, wireless, 4G etc. Sometimes it work and sometimes it does not. But I have never faced this issue with zoom.

Check chrome://webrtc-internals for what is going on there

Thank you, I have checked. All I get is like “Ice disconnected” etc. But no errors. There is no explanation of why its happening. Even if its related to ISP then any idea on what to do?
Sometimes it works fine but sometimes it does not.

The “ICE Disconnected” state can happen for example if a ICE Consent Freshness request (or its response) fails to arrive at its destination. However, this typically happens just by bad luck because the UDP packet is lost in the network… and some seconds later the next refresh does arrive and everything recovers back.

But if the consent refreshes never arrive, this would cause a Disconnected state, possibly followed by a Failed state after some timeout that depends on the browser (e.g. 30 seconds in Firefox). This is explained in the above link.

You might want to use Wireshark to see if there are STUN Binding Requests and Responses flying over the network.

In general if you search for “ICE Disconnected” in discuss-webrtc you’ll see suggestions to detect Disconnected states, wait a bit to see if it fixes itself, and if it doesn’t, perform an ICE Restart.

Also have a look at the complete description of ICE states, specifically this is said about the Disconnected state:

The ICE Agent has determined that connectivity is currently lost for this RTCIceTransport. This is a transient state that may trigger intermittently (and resolve itself without action) on a flaky network. The way this state is determined is implementation dependent. Examples include:

  • Losing the network interface for the connection in use.
  • Repeatedly failing to receive a response to STUN requests.

Alternatively, the RTCIceTransport has finished checking all existing candidates pairs and not found a connection (or consent checks [RFC7675] once successful, have now failed), but it is still gathering and/or waiting for additional remote candidates.

Thank you. Yes, disconnect is followed by a failed state. I am looking into it according to your suggestions. This is what I see in mediasoup debug log:

mediasoup-client:Transport connection state changed to disconnected +21s