[Gemini Mac App] Unhandled gRPC INTERNAL Error (Code 13) causing UI Cache Mismatch on Attachment Stream

Pre-conditions:
The bug is reproducible when sending a message with one or more file attachments in the Gemini for Mac app (macOS). The file upload itself succeeds (HTTP 200), but the subsequent response generation fails.

Expected Behavior:
The server should return a valid response or a graceful error token. The UI should handle any server-side failure by displaying a connection retry state, without crashing its internal message cache.

Actual Behavior:
The server drops the stream with a gRPC INTERNAL error (Code 13), which then triggers a fatal UI cache misalignment where the message UUID is not found in the local cache, leaving the app stuck with no response generated.

Diagnostic Findings:

Upload: The client-side file upload works correctly (returning HTTP 200).

Generation: The failure occurs on the backend during streaming response generation (processStreamResponses), resulting in a gRPC INTERNAL (13) error. This indicates a server-side parsing, processing, or tokenization crash when processing the message with the uploaded attachments.

Relevant Log Snippets:

Stream failure:

Gemini: [com.google.GeminiMacOS:] processStreamResponses(responseStream:rpc:sessionId:chatMessage:clientToolsEnabled:initialSendIndex:): [Stream] [0.495s] Loop exited with ERROR after 2 responses: domain=com.google.iRPC.Error code=13

UI cache mismatch:

Gemini: [com.google.GeminiMacOS:] updateMessage(uuid:index:deliveryStatus:updateChatLatestMessageIndex:): ChatMessage with UUID r_a6710abc47b3a92a not found in cache

Summary:

  • domain=com.google.iRPC.Error code=13 maps to a standard gRPC INTERNAL error, indicating an unexpected server-side exception.
  • The com.google.GeminiMacOS stack trace confirms the crash originates in processStreamResponses and cascades into a fatal UI cache misalignment.

Please escalate to the Gemini Mac app backend and client teams for investigation. Happy to provide additional logs or reproduce steps if needed.

HI @kawonghui

This forum is for issue related to Gemini API

For Gemini App, could you report an issue for the app via the help menu in the app itself