-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
I’m encountering a problem when hosting a lobby from a user behind a VPN.
In this case, other players trying to network.join(lobbyCode) hang indefinitely — no connected event, no error, and no feedback to the app.
Debugging through chrome://webrtc-internals/, I observed:
- Multiple
icecandidateerrorevents occur (STUN discovery failures). - No usable ICE candidates (
addIceCandidate) are generated. - As a result, the connection setup cannot proceed, and
iceconnectionstatechangenever fires.
Cause:
- When the host cannot gather any usable ICE candidates (e.g., public IP discovery fails due to VPN blocking STUN), connection establishment is impossible.
- Netlib doesn't appear to detect this failure case or emit any events to let the app know.
Impact:
- Players joining a VPN-hosted lobby are stuck waiting forever, without any error or feedback.
- The app cannot detect that the lobby is unreachable or retry automatically.
Suggestion:
- Detect when ICE gathering results in no candidates (or ICE connection stays in 'new' state too long).
- Emit an
errorevent or afailedconnection state after a timeout. - Additionally, consider allowing TURN server configuration for better support of VPN and NAT cases.
Metadata
Metadata
Assignees
Labels
No labels