Skip to content

Unhandled AbortError crash during stream generation in processTurn #21122

@7hokerz

Description

@7hokerz

What happened?

When using the gemini-cli, the application unexpectedly crashes with an unhandled AbortError.

Stack Trace:

AbortError: The operation was aborted.
    at abort (file:///C:/Users/.../node_modules/node-fetch/src/index.js:70:18)
    at AbortSignal.abortAndFinalize (file:///C:/Users/.../node_modules/node-fetch/src/index.js:89:4)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:843:20)
    at AbortSignal.dispatchEvent (node:internal/event_target:776:26)
    at runAbort (node:internal/abort_controller:488:10)
    at abortSignal (node:internal/abort_controller:465:5)
    at AbortController.abort (node:internal/abort_controller:507:5)
    at GeminiClient.processTurn (file:///C:/Users/.../packages/core/dist/src/core/client.js:480:28)
    at processTurn.next (<anonymous>)
    at GeminiClient.sendMessageStream (file:///C:/Users/.../packages/core/dist/src/core/client.js:577:32)
Image

What did you expect to happen?

The CLI should catch the AbortError (or signal.aborted state) during the asynchronous stream processing.
tead of crashing the entire Node.js process with an unhandled rejection, it should handle the interruption gracefully.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
│ About Gemini CLI                                                                                                                          
│ CLI Version                               0.32.1
│ Git Commit                                e8a57c78c                                                                       
│ Model                                     Auto (Gemini 3)                                                                 
│ Sandbox                                   no sandbox                                                                      
│ OS                                        win32                                                                           
│ Auth Method                               Logged in with Google (xxx@gmail.com)
│ Tier                                      Gemini Code Assist in Google One AI Pro 
│ IDE Client                                VS Code                                                             

Login information

Google Account

Anything else we need to know?

.

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.status/possible-duplicatetype/bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions