Skip to content

lrc setup: gemini setup failed: failed to provide a valid Gemini API key after 3 attempts #139

Open

Description

@priyankeshh

lrc setup failed

Error: gemini setup failed: failed to provide a valid Gemini API key after 3 attempts

Version: v0.5.7 (2026-07-08T16:12:21Z, d1177e9)
OS: windows/amd64

Debug log
[12:54:02.553] === lrc setup started at 2026-07-28T12:54:02+05:30 ===
[12:54:02.553] lrc version: v0.5.7  build: 2026-07-08T16:12:21Z  commit: d1177e9
[12:54:02.553] os: windows/amd64
[12:54:02.553] resolved config path: C:\Users\priya\.lrc.toml
[12:54:10.288] setup preflight: interactive replace selected, api_url=https://livereview.hexmos.com
[12:54:11.410] setup preflight skipped: token refresh failed: refresh returned 401: {"error":"Invalid or expired refresh token"}
[12:54:11.413] backed up existing config to C:\Users\priya\.lrc.toml.bak.20260728-125411
[12:54:11.682] phase 1: starting hexmos login flow
[12:54:11.683] local server on port 10604, signin url: https://hexmos.com/signin?app=livereview&appRedirectURI=http%3A%2F%2F127.0.0.1%3A10604%2Fcallback
[12:54:20.678] callback received, provisioning user
[12:54:20.967] ensure-cloud-user: status=200
[12:54:20.967] creating API key: POST https://livereview.hexmos.com/api/v1/orgs/369/api-keys
[12:54:21.254] API key created: status=201
[12:54:21.254] phase 1 complete: [email protected] org=369
[12:54:21.254] phase 2: prompting for gemini key
[12:54:57.867] validating gemini key (attempt 1)
[12:54:58.261] gemini key invalid: API key is invalid
[12:55:05.512] validating gemini key (attempt 2)
[12:55:05.940] gemini key invalid: API key is invalid
[12:55:14.402] validating gemini key (attempt 3)
[12:55:14.786] gemini key invalid: API key is invalid
[12:55:14.786] ERROR: gemini setup failed: failed to provide a valid Gemini API key after 3 attempts

Activity

  1. RijulTP commented on Jul 28, 2026

    @RijulTP
    Contributor

    Hey @priyankeshh, thanks for raising the issue. I couldn't reproduce it on my system.

    Could you please check whether the Gemini API key you're using is valid? Please visit https://aistudio.google.com/api-keys and ensure you're using the correct API key.

    If the issue still persists, please let us know.

  2. marcosvile commented on Aug 13, 2026

    @marcosvile

    I also encountered the same problem, and after many attempts, I'll leave testing the tool for another time.

  3. shrsv commented on Aug 13, 2026

    @shrsv
    Contributor

    We will take a look at this again, @marcosvile, sorry it didn't work as expected on your trial

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions