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 gathering times out after 30 seconds in chromium on linux #35

Open
Tracked by #143
johanhelsing opened this issue Apr 25, 2022 · 7 comments
Open
Tracked by #143

Ice gathering times out after 30 seconds in chromium on linux #35

johanhelsing opened this issue Apr 25, 2022 · 7 comments
Labels
bug Something isn't working wasm Only relevant for the wasm implementation

Comments

@johanhelsing
Copy link
Owner

image

@johanhelsing johanhelsing added the bug Something isn't working label Apr 25, 2022
@johanhelsing johanhelsing added the wasm Only relevant for the wasm implementation label Jan 16, 2023
@johanhelsing
Copy link
Owner Author

Checked again today, and this is still happening. Connections seem to still get established after the timeout, though. At least locally (haven't tested behind nat, but I suspect that won't work).

@johanhelsing
Copy link
Owner Author

Still broken on 4db1f49

@simbleau simbleau mentioned this issue Mar 12, 2023
4 tasks
@simbleau
Copy link
Collaborator

Still an issue? Related to #280 ?

@johanhelsing
Copy link
Owner Author

My guess is it's unrelated

@Craig-Macomber
Copy link

I'm seeing a delay that's specific to chromium (Does not impact Firefox or my desktop builds) which I assume is this issue with matchbox_socket = "0.10.0".

I noticed this since I use chromium since it supports source level debugging of WASM ( Instructions here: https://github.com/rustwasm/book/pull/321/files ). Maybe that will help debug it.

Glad to know this is a known issue and not something on my end.

@caspark
Copy link
Contributor

caspark commented Dec 10, 2024

I ran into this today so I investigated a bit:

  • The 701 error with STUN binding request timing out doesn't seem to be a problem in and of itself - rather the problem is that it takes a long time for the ICE gathering to complete.
  • I get this slowness on both Chromium and Firefox.
  • Google's stun servers (e.g. stun.l.google.com) seem particularly slow, but if I use a different stun server (e.g. STUN:stun.f.haeder.net:3478 from https://gist.github.com/zziuni/3741933) the ICE gathering completes much faster.
  • I noticed that Google's server has an IPv6 address in addition to IPv4, whereas that stun.f.haeder.net server only has IPv4 - so a possible explanation is that the IPv6 NAT traversal doesn't succeed, and that's only determined when it eventually times out.
  • On https://issues.webrtc.org/issues/40644526 there is some discussion about "the timeout is 40 seconds in Chromium to allow plenty of time for bad networks".. I haven't timed how long the ICE gathering completion takes but 40 seconds sure feels about right.
  • Over at https://groups.google.com/g/discuss-webrtc/c/j595lLysVYI/m/Lh7N9auuAQAJ it is suggested that it is bad form to wait for ICE gathering to complete at all - they suggest setting much shorter manual overall timeout.
    • I hacked up a 3 second timeout patch over at caspark@bd00500 - if there's interest I could clean it up and PR it (the timeout should probably be configurable)
  • Another option would be to send ICE candidates as offers to peers immediately as they trickle in - but that seemed like a much more invasive change so I haven't looked into it.

@Craig-Macomber
Copy link

I can confirm that I do not have working IPv6 currently, so its possible the issues I saw are related to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wasm Only relevant for the wasm implementation
Projects
None yet
Development

No branches or pull requests

4 participants