Our client recently reported Room connection errors on some Windows machines on Firefox and Edge.
We noticed they are using a VPN (so this issue might be OS independent).
Their browser logged this error: ConnectionError: could not establish signal connection: Encountered unknown websocket error during connection
I tested this on my PC with another VPN provider and did not get this very error though saw this one: could not establish pc connection
It is also highly browser and region dependent if this error is thrown with the VPN or not.
I also noticed in the network tab that the browser constantly calls a GET request to the livekit cloud regions before it often fails with the error from above.
If this is not “fixable” then can we somehow tell that the connection failed due to an active VPN connection? In this case we can show a more detailed error to the users so they understand they shall deactivate their VPN if possible.
and on some dedicated endpoints with (again) certain browsers I got this issue.
I am not really sure what to look for to be honest.
If you think a blocked websocket is the problem, then can I somehow catch and log this very specific error? Then I can test if this catch is primarily fired when the VPN is being used.
I am not really familiar with your code or what you are doing but you can catch ConnectionError and inspect its message. If it consistently fails during WebSocket setup, you can surface a user hint about VPN/firewall interference.
@CWilson Hello. I was checking this out again, but unfortunately I wasn’t able to catch such a ConnectionError. The LiveKit JS Client SDK did not throw any error during room.connect. I attached you the internal logs that the livekit-client.js is logging, because I am not sure how to properly catch these errors.