Replies: 1 comment 1 reply
-
Hi @nieg675, Could you try to run all unit tests in ex_webrtc on your machine and see if that happens too? ICE tries to select the best candidate pair so if you provide multiple candidates, the selected pair can change in time. It might be that we select different pairs on each end (due to some bug) and that's the reason why your peer connections disconnect. Could you also provide versions of ex_webrtc and ex_ice, and dump debug logs from the both failing and successful tests? Note that these logs may include your public IP address so if you prefer to, you can send them on michal.sledz@swmansion.com or somehow sanitize them. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I was writing unit tests for some WebRTC functionality using
ex_webrtc
, and i noticed something a little strange. In my test, i am basically just connecting twoex_webrtc
clients to each other and then waiting for 30s, to see if the connection remains successful. What i noticed is that 10-20% of the times it would fail. I would get the {:connection_state_change, :connected} on both clients so initially it would work, but then eventually i would get {:connection_state_change, :failed}, and a warning from ExICE:12:07:53.601 [warning] <module=ExICE.Priv.ICEAgent function=change_connection_state/2 line=2576 > Requested ICE agent to move to the failed state but keepalives are not empty. Clearing keepalives.
I was really puzzled about this, so i took a look at the
ex_webrtc
unit tests to find an example (e.g. ExWebRTC.DataChannelTest), and here i saw that you always only pass the first ice candidate for each peer, and ignore the rest. I tried that, and my test was stable and the connection never failed anymore.Is there anything that could explain this behavior? I am able to reproduce it on multiple machines. I can provide code and logs if needed.
Beta Was this translation helpful? Give feedback.
All reactions