client-sdk-js: Initial connection failed with ConnectionError: could not establish signal connection: RTCPeerConnection is not a constructor
Describe the bug Trying to use livekit in nextjs 14, but getting this errors several times
Initial connection failed with ConnectionError: could not establish signal connection: RTCPeerConnection is not a constructor. Retrying with another region: <my_livekit_cloud_url>
then disconnected notification
Screenshots
“livekit-client”: “^1.15.4”, “livekit-server-sdk”: “^1.2.7”,
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 17 (9 by maintainers)
this should be fixed in #1022. it’ll be resolved in the next release.
I am also experiencing the same error: ‘Initial connection failed with ConnectionError: could not establish pc connection. Retrying with another region…’ and immediately after: 'Could not createOffer with closed peer connection.’ I’m using the latest version of Google Chrome on Mac. Essentially, the connection keeps disconnecting and reconnecting after a few seconds.
WRT to the original issue:
RTCPeerConnection is not a constructor- this is most likely caused by a browser extension disabling WebRTC altogether (might be a privacy related one)