Getting "WebRTC: ICE failed, your TURN server appe...
# ask-ai
m
Getting "WebRTC: ICE failed, your TURN server appears to be broken" using the JS sdk in Firefox. What should I do?
t
Thanks for reaching out, Michael. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm sorry to hear you're encountering the "WebRTC: ICE failed, your TURN server appears to be broken" error in Firefox. This usually points to some hiccups with the ICE (Interactive Connectivity Establishment) process or the TURN server setup. Let's walk through some steps together to get this sorted out: • Ensure TURN/TLS Support: First, please check that your TURN server supports TURN/TLS and is accessible on port 443. If you're using LiveKit Cloud, good news—TURN servers with TLS are already provided for you. • Force TURN Usage: Try configuring your client to use TURN explicitly by setting
iceTransportPolicy: 'relay'
in your connection options. Here's a quick example:
connectOpts.rtcConfig = { iceTransportPolicy: 'relay' };
• Update LiveKit JS SDK: Make sure you're running version 1.2.11 or later of the LiveKit JS SDK, as this version includes important ICE restart support for Firefox. • Firewall and Network Restrictions: Sometimes, UDP traffic might be blocked on your network. If that's the case, please ensure that TCP port 443 is open and, if using LiveKit Cloud, whitelist
*.turn.livekit.cloud
. • Verify TURN Configuration: Lastly, double-check your server-side setup to confirm that TURN/TLS servers are included and properly authenticated. These steps usually do the trick, but if you run into any bumps or have questions along the way, please don’t hesitate to reach out. I’m here to help! Sources: Firewall Tips | CHANGELOG.md | Documentation/ImprovingCallReliability.md
m
also what about "ConnectionError: could not establish pc connection. Retrying with another region"
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!