Skip to content

[Bug] CLI crash loop on startup after failed "Login with Google" (ProjectIdRequiredError) #17300

@OhashiReon

Description

@OhashiReon

What happened?

  1. I ran gemini and selected "Login with Google".
  2. I authenticated with a specific personal Google Account (which unexpectedly triggered a ProjectIdRequiredError despite being a non-Workspace account).
  3. Browser: Authentication was successful.
  4. Terminal: Failed with: Message: This account requires setting the GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID env var.
  5. I terminated the process.
  6. I ran gemini again.
  7. Result: The CLI crashes immediately with ProjectIdRequiredError, loading the cached credentials. I cannot return to the menu to select a different authentication method.
Loaded cached credentials.
Error authenticating: ProjectIdRequiredError: This account requires setting the GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID env var. See https://goo.gle/gemini-cli-auth-docs#workspace-gca
    at setupUser (file:///C:/Users/ter/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/code_assist/setup.js:85:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async createCodeAssistContentGenerator (file:///C:/Users/ter/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/code_assist/codeAssist.js:15:26)
    at async file:///C:/Users/ter/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/contentGenerator.js:77:48
    at async createContentGenerator (file:///C:/Users/ter/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/contentGenerator.js:53:23)
    at async Config.refreshAuth (file:///C:/Users/ter/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/config/config.js:555:33)
    at async main (file:///C:/Users/ter/AppData/Roaming/npm/node_modules/@google/gemini-cli/dist/src/gemini.js:231:17)

What did you expect to happen?

If cached credentials fail the setupUser check (e.g., missing Project ID), the CLI should catch the error, ignore or invalidate the problematic cache, and present the authentication menu again. It should not crash the process loop.

Client information

  • Platform: Windows
  • Version: 0.27.0-nightly.20260122.61040d0eb

Login information

I selected "Login with Google" (OAuth).

Anything else we need to know?

  • Account Context: Used a personal Gmail account (non-Workspace) which seems to be flagged as requiring a Google Cloud Project for some reason.
  • Workaround: I was able to recover by manually deleting the configuration folder (%USERPROFILE%\.config\google-gemini-cli or .gemini).

Metadata

Metadata

Assignees

No one assigned

    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