Getting 1011 Error when i have been using bi-directional websocket with gemini liveAPI. What's the solution? #3360
Replies: 1 comment
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: A WebSocket 1011 error in ADK indicates a generic, unhandled exception on your backend server, not a client-side or network issue. The most likely causes are resource exhaustion (like hitting an API quota for a tool) or using a model that doesn't support the Gemini Live API. The key is to improve your server-side logging to capture the underlying exception that triggers the 1011 error. Hello! Thanks for reaching out. The WebSocket error code 1011 you're seeing is a generic "Internal Error" that our ADK web server uses to close a connection when it encounters an unexpected server-side issue. [1] This means the problem is likely in your Cloud Run backend, where an unhandled exception occurs during the agent's communication loop. Here are some of the most common triggers for this error:
To resolve this, I recommend the following troubleshooting steps:
By adding more robust [1] https://github.com/google/adk-python/blob/main/src/google/adk/cli/adk_web_server.py |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m consistently hitting a 1011 Internal Error while using bi-directional WebSocket streaming with the Gemini Live API.
Setup details:
Using a sub-sequential agent workflow
Frontend connects via WebSocket
Backend is deployed on Cloud Run
Agent communicates with Gemini through the Live API stream
The issue:
The WebSocket connection drops with a 1011 error, and I’m unable to pinpoint the root cause. No clear logs or explanations from the server side.
Has anyone faced this? What are the common triggers or recommended fixes for 1011 errors with Gemini Live API WebSocket sessions?
Beta Was this translation helpful? Give feedback.
All reactions