Skip to content

CLI Crash: [API Error: Cannot read properties of undefined (reading 'error')] triggered by AbortError #14160

Closed as duplicate

Description

@pablorgarrido

What happened?

While using the CLI, the application crashed with an "API Error". Looking at the Debug Console, it appears to be triggered by an
AbortError (The user aborted a request), followed by a React state update error (Cannot update a component...).

Error Output:

1 > ✕ [API Error: Cannot read properties of undefined (reading 'error')]
2 >
3 > Debug Console:
4 > error: AbortError: The user aborted a request.
5 > at abort (...\node-fetch\lib\index.js:1458:16)
6 > ...
7 > ✖ Cannot update a component (`InputPrompt`) while rendering a different component (`AppContainer`).
8 > ```
9

10 ---

What did you expect to happen?

The CLI should handle the request abort/cancellation gracefully without crashing the entire application or throwing an unhandled
exception regarding undefined properties.

Client information

  • CLI Version: 0.18.4
  • Git Commit: 2e8d783
  • Session ID: 2fb14ac7-ee3a-4218-ac9e-504ee4279d31
  • Operating System: win32 v24.11.1
  • Sandbox Environment: no sandbox
  • Model Version: auto
  • Memory Usage: 268.9 MB

Login information

Google Account (ADC / gcloud)

Anything else we need to know?

Environment:

  • OS: Windows (win32)
  • Node Version: v24.11.1 (observed in the stack trace path)
  • CLI Path: C:\ProgramData\nvm\v24.11.1\node_modules@google\gemini-cli

Full Stack Trace:

1 > error: AbortError: The user aborted a request.
2 >         at abort (C:\ProgramData\nvm\v24.11.1\node_modules\@google\gemini-cli\node_modules\node-fetch\lib\index.js:1458:16)
3 >         at AbortSignal.abortAndFinalize
4 >   (C:\ProgramData\nvm\v24.11.1\node_modules\@google\gemini-cli\node_modules\node-fetch\lib\index.js:1473:4)
5 >         at [nodejs.internal.kHybridDispatch] (node:internal/event_target:845:20)
6 >         at AbortSignal.dispatchEvent (node:internal/event_target:778:26)
7 >         at runAbort (node:internal/abort_controller:488:10)
8 >         at abortSignal (node:internal/abort_controller:459:3)
9 >         at AbortController.abort (node:internal/abort_controller:507:5)

10 > at file:///C:/ProgramData/nvm/v24.11.1/node_modules/@google/gemini-cli/dist/src/ui/hooks/useGeminiStream.js:160:36
11 > at file:///C:/ProgramData/nvm/v24.11.1/node_modules/@google/gemini-cli/dist/src/ui/AppContainer.js:763:35
12 > at file:///C:/ProgramData/nvm/v24.11.1/node_modules/@google/gemini-cli/dist/src/ui/contexts/KeypressContext.js:499:77
13 > ```
14
15 ---
16

Activity

  1. added
    area/coreIssues related to User Interface, OS Support, Core Functionality
    priority/p0Critical and urgent (e.g., critical security vulnerability, major breakage).
    and removed
    status/need-triageIssues that need to be triaged by the triage automation.
    on Nov 30, 2025
  2. changed the title [-][BUG] Erro "Cannot read properties of undefined (reading 'error')" após AbortError na CLI[/-] [+]CLI Crash: [API Error: Cannot read properties of undefined (reading 'error')] triggered by AbortError[/+] on Nov 30, 2025
  3. added
    priority/p2Important but can be addressed in a future release.
    and removed
    priority/p0Critical and urgent (e.g., critical security vulnerability, major breakage).
    on Dec 1, 2025
  4. casperlim99 commented on Dec 2, 2025

    @casperlim99

    I am having the same issue as well. On the latest version of Gemini CLI.

  5. 3AceShowHand commented on Dec 3, 2025

    @3AceShowHand

    me too, how to fix this ?

  6. silviojr commented on Dec 5, 2025

    @silviojr
    Contributor

    I spotted how to fix it. I will submit a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitypriority/p2Important but can be addressed in a future release.status/possible-duplicate

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions