Quick connection diagnostics
Work through this checklist when someone suddenly stops advancing on the mountain. Each step takes less than a minute and isolates the most common issues.
Reload and compare
- Refresh the tab you are using for Avalanche. Players keep their spot because `playerId` lives in `localStorage`.
- Open another site in the same browser profile to confirm general internet access.
- If only Avalanche stalls, move on to the Firestore check; if all sites are slow, address the broader network first.
Check Firestore
- Open browser devtools (F12) and watch the Console tab while answering a question or loading `/join`.
- Look for errors mentioning `firestore.googleapis.com`. Common ones: `permission-denied` (rules issue) or `unavailable` (network outage).
- If you see `ERR_BLOCKED_BY_CLIENT`, disable ad blockers or corporate filtering for the site and reload.
Inspect Socket.IO
- Go to devtools → Network → WS and reload the page. A successful entry shows `.../socket` upgrading to WebSocket.
- If the socket immediately closes, you can keep playing – the app falls back to Firestore – but avalanche prompts may lag.
- When sockets are blocked on your network, ask the host to monitor the event log closely or temporarily set `NEXT_PUBLIC_DISABLE_SOCKETS=true` during deployment.
Swap connections
- Temporarily tether through mobile data or another Wi-Fi network. If the issue disappears, the original network is filtering Google APIs or WebSockets.
- Classroom and office networks often require an allow-list entry for `firestore.googleapis.com` and the Cloud Functions socket domain.
Restart the app tab
- Completely close the browser tab (not just the window) and reopen Avalanche from a blank tab.
- Hosts should reopen the dashboard immediately – Firestore resubscribes within a couple of seconds and the lobby resumes.
One-minute checklist
- Refreshed the Avalanche tab
- Tested another site in the same browser
- Checked devtools console for Firestore errors
- Verified the WebSocket handshake
- Tried an alternate network
- Reopened the app tab
Common symptoms
Only one player is stuck at an old question
Have them refresh. If the problem persists, delete their player document from the lobby and let them rejoin with the same name.
Everyone froze together
Refresh the host dashboard. If it reconnects and the problem vanishes, the host tab was throttled or lost its Firestore listener.
Avalanche prompt never appeared
Socket likely dropped. Watch the event log for avalanche entries or temporarily disable sockets altogether.
Device-specific suggestions
Chromebook / desktop browsers
- Use Chrome, Edge, or Firefox updated to the latest version for best WebSocket support.
- Clear the site storage (Application tab → Clear storage) if Firebase auth tokens look stale, then sign in again.
iOS Safari
- Force close Safari, reopen, and load `/join` again. iOS occasionally suspends long-running tabs after backgrounding.
- Disable Low Data Mode while you play; it throttles fetch requests to Firestore.
Android Chrome
- Toggle Airplane mode for 10 seconds to reset the radios, then reconnect to Wi-Fi and reopen the tab.
- If Chrome Lite mode is enabled, disable it – it proxies requests through Google and can delay websocket upgrades.