GEMTOK Docs
Troubleshooting

Stream Connection

Fix SSE and WebSocket connection issues, disconnections, and common error messages in GEMTOK

GEMTOK uses Server-Sent Events (SSE) and WebSocket to receive real-time chat, gifts, likes, and viewer events from your live stream. These are persistent connections that stay open in your browser. If your internet is unstable or the browser throttles background tabs, the connection can drop.

This guide explains all error messages you might see and how to fix them.

How SSE and WebSocket Work in GEMTOK

You enter your username and click Connect.

GEMTOK server finds your RoomID and opens a persistent connection to TikTok / YouTube / Twitch.

Your browser keeps an SSE or WebSocket connection open to GEMTOK server to receive events in real-time.

If the connection drops, GEMTOK will automatically try to reconnect with exponential backoff.

A short disconnection (1-3 seconds) is normal and GEMTOK will auto-reconnect. If it keeps disconnecting every few minutes, check the causes below.

Why Connection Drops in Browser

CauseExplanation
Unstable InternetWiFi packet loss, mobile data switching between 4G/5G, high ping.
Browser Background ThrottlingChrome/Edge pauses setTimeout and WebSocket when tab is minimized or behind OBS.
VPN / Proxy / FirewallCorporate firewall, school WiFi, or VPN can block long-lived connections.
AdBlocker / ExtensionsuBlock, AdGuard, Brave Shield can block SSE/WebSocket requests.
Antivirus / Windows FirewallSome antivirus terminates persistent connections after 30-60s.
Server Idle TimeoutSome ISPs or proxies close idle connections after 60 seconds if no ping/pong.
Sleep / Power SaverLaptop going to sleep or Memory Saver discarding the tab.

Complete Error Message List

1. Connection & Network Errors

Error MessageCauseHow to Fix
Transport disconnectedNo internet connection, or browser went offline. navigator.onLine === false.Check WiFi/LAN cable. Disable airplane mode. Try ping 8.8.8.8 in terminal. Reconnect after internet is stable.
Connection timeout / Connection timed outServer didn't respond within 10-15s. High latency or server overloaded.Check your internet speed at fast.com. If >150ms ping, switch to wired LAN. Wait 1 minute and retry.
Network error / Failed to fetch / ERR_INTERNET_DISCONNECTEDBrowser failed to make HTTP request for SSE handshake.Reload page (Ctrl+R). Check if https://www.gemtok.live is accessible. Disable VPN temporarily.
Failed to connect to server / ERR_CONNECTION_REFUSEDGEMTOK server unreachable or blocked by firewall.Check if firewall/antivirus blocks gemtok.live. Whitelist it. Try mobile hotspot to confirm if ISP blocks.
Browser is offlineBrowser detected offline state.Same as Transport disconnected. Check OS network icon.

2. Username & Room Errors

Error MessageCauseHow to Fix
Target URL is too shortUsername is too short (less than 2 characters) or you pasted an incomplete URL.Enter full username without @. Example: charlidamelio not @charli. Don't paste TikTok video URL, use username only.
RoomID not foundUsername is invalid, private, or doesn't have live access. TikTok API returned no RoomID.Double-check spelling. Make sure account is public and has LIVE access. Try searching username on TikTok web.
The requested user isn't onlineUser exists but is not currently LIVE.Start your live stream FIRST, then connect in GEMTOK. Wait 20-30s after going live before connecting.
Live stream endedStream was live when you connected, but ended during session.Restart your live. Reconnect in GEMTOK. This is normal when you end live.
Something went wrongGeneric fallback - invalid username, invalid live URL, or TikTok changed API.Re-enter username. Try with and without https://www.tiktok.com/@username/live. Update GEMTOK to latest version. Contact support if persists.
User not found / Invalid usernameTikTok user doesn't exist or was banned.Verify username on TikTok app. If you changed username recently, use new one.

3. SSE Specific Errors

Error MessageCauseHow to Fix
EventSource failed / SSE connection error / EventSource's response has a MIME type mismatchBrowser failed to establish SSE. Often caused by adblocker or proxy stripping text/event-stream header.Disable adblocker for gemtok.live. In Brave, disable Shield. If behind corporate proxy, ask IT to allow text/event-stream. Try Chrome incognito.
Stream closed unexpectedlyServer closed SSE stream without retry field.GEMTOK will auto-reconnect. If loops, reload page. Check console for HTTP status code.
Heartbeat timeout / Ping timeoutNo ping received from server for 30-45s. ISP or proxy killed idle connection.This is common on mobile data. Switch to stable WiFi/LAN. Disable battery saver. GEMTOK auto-reconnects, no action needed unless frequent.

4. WebSocket Specific Errors

Error MessageCauseHow to Fix
WebSocket closed / WebSocket is closed before connection is establishedConnection dropped before handshake finished.Reload page. Check if wss:// is blocked by firewall. Some public WiFi blocks WebSocket.
1006 Abnormal ClosureMost common WebSocket error. No close frame received - network cut, browser killed tab, or server crashed.Check internet stability. Disable Memory Saver for GEMTOK tab at chrome://settings/performance. Keep tab visible, not minimized.
1001 Going AwayBrowser navigated away or tab was closed/discarded.Don't close GEMTOK tab. Add site to "Always keep active" list in Chrome performance settings.
1000 Normal Closure but keeps happeningServer intentionally closed connection, usually because live ended or session expired.Reconnect manually. If it happens every 2-3 minutes while live is still on, report to support with console logs.
Mixed Content: The page was loaded over HTTPS, but attempted to connect to insecure WebSocket ws://Browser blocks insecure ws:// on HTTPS page.Make sure you access GEMTOK via https://www.gemtok.live, not http://. This should not happen in production, but can happen if using custom proxy.
WebSocket error: ERR_CONNECTION_RESETTCP connection reset by peer - antivirus, VPN, or ISP reset.Disable antivirus web shield temporarily. Disconnect VPN. Try different network.

5. Auth, Rate Limit & Server Errors

Error MessageCauseHow to Fix
Unauthorized / Session expired / Token expired / 401Login session expired or you logged out in another tab.Logout and login again. Refresh page. If using PWA, close and reopen.
Forbidden / 403 / Access deniedYour IP or account is blocked, or you don't have permission for this feature.Check membership status. If free user trying premium feature, upgrade. Contact support if you think it's a mistake.
Rate limited / Too many requests / 429Too many connect attempts in short time. TikTok also rate limits RoomID lookups.Wait 2-5 minutes before retrying. Don't spam Connect button. GEMTOK has built-in cooldown.
Server error / 500 Internal Server Error / 502 Bad Gateway / 503 Service UnavailableGEMTOK server or upstream TikTok server error.Wait 1-2 minutes and retry. Check GEMTOK Discord / status page. Usually temporary.
CORS error / Blocked by CORS policyBrowser blocked request due to CORS. Usually caused by extension or custom proxy.Disable extensions. Don't use third-party proxy that modifies headers. Try incognito mode.

How to Diagnose

Open DevTools Console

Press F12 or Ctrl+Shift+J > Go to Console tab. Look for red errors when connection fails. Screenshot it for support.

Check Network Tab

F12 > Network tab > Filter by WS (WebSocket) or Fetch/XHR for SSE. Reload and connect. Click the failed request to see Status Code and Response. 101 for WebSocket is success, 200 for SSE is success. 4xx/5xx indicates error.

Test in Incognito

Open Ctrl+Shift+N incognito window, go to GEMTOK, and connect. If it works there, an extension is causing it. Disable adblocker, VPN extension, or privacy extensions one by one.

Test Different Network

Try mobile hotspot. If hotspot works but WiFi doesn't, your ISP / router / firewall blocks SSE/WebSocket. Restart router, or whitelist *.gemtok.live.

Best Practices for Stable Connection

Use Wired LAN, Not WiFi

Ethernet is 10x more stable than WiFi for long-lived connections. If you must use WiFi, stay close to router and use 5GHz band.

Keep GEMTOK Tab Active and Visible

Don't minimize. Pop out to separate window. Disable Memory Saver: chrome://settings/performance > Add https://www.gemtok.live to "Always keep these sites active". See Game Paused guide for details.

Whitelist GEMTOK

In adblocker (uBlock Origin, AdGuard): Add gemtok.live to trusted sites. In antivirus: Add exception for gemtok.live. In Windows Firewall: Allow Chrome/Edge.

Avoid VPN / Proxy for Streaming

If you need VPN, use split tunneling and exclude Chrome / GEMTOK from VPN. Some VPNs kill idle WebSocket after 60s.

Keep Browser Updated

Use latest Chrome or Edge. Old browsers have buggy WebSocket implementations. Chrome 110+ recommended.

Don't Spam Reconnect

If connection fails, wait 5-10 seconds before clicking Connect again. Spamming triggers rate limit (429) and makes it worse. Let auto-reconnect do its job.

Still Not Working?

If you see 1006 Abnormal Closure or Transport disconnected more than 5 times in 10 minutes, your internet is unstable. Fix your network first before reporting bug - GEMTOK cannot maintain connection if underlying internet drops.


On this page