red-television-3815
05/17/2026, 6:28 PMtall-airline-16756
05/17/2026, 6:28 PMtall-airline-16756
05/17/2026, 6:28 PMrtcConfig.iceTransportPolicy = 'relay' for a test.)
• Agent details: SDK/runtime version, deployment region, and whether the agent scales to zero on your plan.
• Do you see the failed join attempts in the LiveKit project/room activity (if available) or only nothing on agent logs?
Meanwhile, try these quick checks:
• Run the LiveKit Connection Test from the same network (https://livekit.io/connection-test).
• Enable client debug logs and check browser network/console for WebSocket/ICE errors.
• Confirm your token timestamps (`nbf`/`exp`) and system clocks are synced.
Send the console errors + token flow and agent version/region and I’ll suggest targeted next steps.
Sources: Build agent experiences faster with Session APIs | LiveKit | Diagnosing Connection Errors with Connection Test Utility | Troubleshooting 401 Unauthorized and Token Errors | LiveKit | Firewall Tips | Deployment reliability on LiveKit Cloud | LiveKit, with interactive elementsred-television-3815
05/17/2026, 6:33 PMtall-airline-16756
05/17/2026, 6:33 PM/settings/regions. That can cause extra network churn and may point to the client retrying region discovery before connecting.
Quick checklist and next steps so I can pinpoint the root cause:
• Which version of the Starter React UI / @livekit/components-react are you using?
• What does the browser console show when those requests happen? Any errors (network failures, 429s, 500s)? Paste one full request/response pair if possible.
• Is the response body for /settings/regions returning valid JSON with region URLs and distances each time, or is it an error/empty payload sometimes?
• Are you running any custom code that calls region discovery, or is this the unmodified starter UI?
• Does the repeated polling stop after a successful connect, or continue indefinitely even when connected?
• Any proxy, adblocker, or corporate network that might interfere with caching or long‑lived connections?
While you gather that, try this quick test:
• Open DevTools → Network, filter by /settings/regions, then reproduce. Note the request frequency and response status codes. Share one normal and one failing example.
Send the version, one request/response, and whether this behavior stops on connect — I’ll suggest the exact fix (config change, caching, or a patch) based on that.
, with interactive elementsred-television-3815
05/17/2026, 6:53 PMtall-airline-16756
05/17/2026, 6:54 PM/settings/regions, and WebSocket connects that don’t dispatch a job to the agent.
A few targeted questions to narrow this down:
• Which versions are you using for the Starter React UI and @livekit/components-react?
• How are you generating tokens in the UI (server endpoint, static token, TokenSource)? Paste one example response (no secrets) of the token endpoint payload and headers if you can.
• In the browser console / Network tab, what is the HTTP status and response body for /settings/regions when it repeats? Is it always 200 with valid JSON, or are there intermittent errors (429/500/timeout)?
• Do the repeated /settings/regions calls stop when a connection succeeds, or do they continue even after connect?
• When the WebSocket opens but no job is dispatched, do you see any WebSocket close codes or ConnectionError events in the console? Copy one full WebSocket open/close sequence if possible.
• Agent details: SDK/runtime version and deployment region, and whether your agent can cold-start (scales to zero).
While you collect that, try this quick test and share results:
1. In DevTools → Network, reproduce until failure and capture one full sequence of /settings/regions requests plus the WebSocket frames.
2. Temporarily set rtcConfig.iceTransportPolicy = 'relay' in the client to rule out ICE/TURN issues.
3. Check your token timestamps (`nbf`/`exp`) and system clock drift.
Send the version info, one /settings/regions request/response, and one WebSocket console excerpt — I’ll use those to recommend the exact next steps or a config/workaround.
, with interactive elementsred-television-3815
05/17/2026, 6:55 PMtall-airline-16756
05/17/2026, 6:55 PMagent_name (dispatch name) does your agent deploy with, and does the frontend/token include that same name? If they don’t match, dispatch will not occur.
• Replica count / cold starts: how many agent replicas did you deploy for that agent_name? Intermittent dispatches often happen with a single replica (cold starts/timeout). Deploying 3+ workers prevents contention/cold-start timeouts.
• Token grants / creation timing: the starter repo token endpoint must include the dispatch info in the token when the room is created. Are you using the default token endpoint unmodified, or did you change token generation? Also confirm tokens aren’t expiring immediately (check `nbf`/`exp`).
• Does dispatch succeed if you create a fresh room vs joining an existing room? Dispatch via token only applies when the room is first created.
• Any WebSocket/console traces when dispatch fails (open/close codes or ConnectionError)? Paste one short excerpt.
• Agent runtime/version and region, and whether agent logs ever show registration (even briefly) when dispatch succeeds.
Immediate actions you can try now:
• Ensure the token includes the correct agent_name dispatch grant and create a new room (don’t join an already-created room) to test.
• Increase agent replicas to 3 for that agent_name to eliminate cold-starts/timeouts.
• Capture one failing sequence: browser console + network (WebSocket frames) + the token response (mask secrets). Share those and I’ll give the exact fix.
Tell me the agent_name, replica count, whether you modified token generation, and one short console/WebSocket excerpt and I’ll recommend the next concrete step.
Sources: Build agent experiences faster with Session APIs | LiveKit | Diagnosing Connection Errors with Connection Test Utility | Agent dispatch | LiveKit Documentation, with interactive elementsred-television-3815
05/17/2026, 6:57 PMtall-airline-16756
05/17/2026, 6:57 PMagent_name, the frontend’s dispatch won’t target it, so rooms can open (WebSocket connects) but no job is assigned.
What to do next (quick steps):
1. Choose an agent dispatch name (example: voice-agent).
2. Deploy the agent with that name:
◦ If using the CLI: lk agent deploy --name voice-agent (or set agent_name in your deploy config).
1. Update your token generation so the token includes the same agent_name dispatch grant when creating the room (ensure the token is created at room creation time).
2. Deploy multiple replicas to avoid cold-start timeouts: set replicas to 3 for that agent_name.
3. Test by creating a new room (not joining an existing one) and watch agent logs/console for the dispatched job.
If you want, paste your deploy command/config and your token-generation snippet (remove secrets) and I’ll show the exact changes needed.
, with interactive elements