Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Updating the managed Antigravity runtime from 1.4.5 to the native CLI 1.5.x signs Linux instances out when no keyring is usable #36033

Closedsittingmongoose(GitHub profile, opens in a new tab) opened this issue 4 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Related, not duplicates: #34327 (after the move to the native CLI, the usage probe still reads the old acp_token.json; that is the same storage split with a different symptom), #35409 (the migration to the native CLI; its smoke test was macOS only). Signing in again afterwards is its own bug: #36034.

Area

apps/server

Steps to reproduce

  1. On a Linux x64 server with no usable Secret Service keyring, sign an Antigravity instance in with Google (oauth-personal) while the managed 1.4.5 runtime is active. "No usable keyring" covers a headless server, and also a desktop whose login keyring stays locked. Because T3 launches that runtime with AGY_ACP_FORCE_FILE_STORAGE=1 (apps/server/src/provider/antigravityAuthSupport.ts:225), the token lands in <profile>/antigravity-acp/acp_token.json.
  2. Update the managed runtime: Settings → Providers → Antigravity → Update Antigravity, or provider.install.start. This installs the native CLI 1.5.8.
  3. Let T3's post-install model refresh run, or start a new Antigravity session.

Expected behavior

The instance stays signed in, as #35409 describes: "Existing login and conversation history stay in the same profile." The docs only warn "You may need to sign in again after migration". When a new sign-in is needed, T3 should say so as soon as the update finishes.

Actual behavior

  • 1.5.8 does not find the old sign-in. It tries the keyring (5 s timeout, twice), then falls back to its own file store, finds nothing, and starts a browser sign-in:

    ACP authenticate: methodId="oauth-personal"
    Keyring LoadStoredToken timed out after 5s, falling back to file storage
    Using file-based token storage because a keyring timeout was recorded within the last 1h0m0s
    ... You are not logged into Antigravity.
    Opening browser for ACP sign-in (method=consumer, redirect=http://localhost:<port>/auth/callback)
    authenticate("oauth-personal") failed: Sign-in was cancelled. (code -32800)   # when T3 gave up, 90 s later
  • The two runtimes use different token files in the same directory.

    • 1.5.8 reads <gemini-dir>/antigravity-acp/antigravity-oauth-token and never opens acp_token.json. Its first-run step ("Attempting migration from AppDataDir <profile>/antigravity-acp … Migration complete") does not carry the token over.
    • I confirmed this on a scratch profile by running the public 1.5.8 linux-x64 build as antigravity acp --gemini-dir <scratch> --app-data-dir antigravity-acp under strace, with a dummy acp_token.json in place. It opened antigravity-oauth-token (ENOENT) and never touched acp_token.json.
    • 1.5.8 also ignores AGY_ACP_FORCE_FILE_STORAGE (as noted in #34327).
  • Every instance on the managed runtime is signed out at once, because they all switch to the new runtime together.

  • T3 keeps showing the instance as signed in. The post-install refresh fails after 90 s with "Antigravity model refresh timed out. Try again or check Google sign-in.", while auth.status stays authenticated and status stays ready. Each new session then waits about 90 s at authenticate. The cause is in the sign-in issue (#36034): T3 cannot see 1.5.x's sign-in request.

  • Windows kept its sign-in after the same update. There the 1.5.8 log shows keyringAuth: loaded token … ChainedAuth: authenticated via keyring, because the older runtime had also stored the token in Credential Manager. A Linux host with a working, unlocked keyring may behave like Windows; I did not test that case.

Impact

Blocks work completely

Version or commit

0.1.10-nightly.20261113.4616 (main @ 0b0a61a01f has the same code). Managed runtime 1.4.5 (agy_acp_server 1.4.5, linux-x64) → Antigravity CLI 1.5.8 (1.5.8-4602374149505024/linux-x64).

Environment

Ubuntu x64 VM running the standalone T3 server as a service. GNOME login keyring present but locked. Google personal sign-in (oauth-personal). Windows 11 x64 desktop for comparison.

Logs or stack traces

# 1.5.8 on a scratch profile (strace -e openat), dummy acp_token.json present beside it
openat(AT_FDCWD, "<gemini-dir>/antigravity-acp/antigravity-oauth-token", O_RDONLY|O_CLOEXEC) = -1 ENOENT
openat(AT_FDCWD, "<xdg-config>/antigravity/credential-user-scope", O_RDONLY|O_CLOEXEC) = -1 ENOENT
# no openat of acp_token.json

Suggested direction: before the first launch of a native CLI on a profile that still has acp_token.json and no antigravity-oauth-token, have T3 carry the stored sign-in over. If that isn't possible, mark the instance signed out as part of the update and say why. The docs line "You may need to sign in again after migration" would then name the case: Linux hosts without a usable keyring.

Workaround

Sign in again. In-app Sign in cannot finish with 1.5.x on such a host (#36034), so it has to be the CLI's own terminal login against the instance's profile:

<managed antigravity binary> acp --login --gemini-dir <profile> --app-data-dir antigravity-acp

It prints a Google link that redirects to https://antigravity.google/oauth-callback and asks for the code shown there. I haven't yet confirmed that T3 picks up a sign-in made this way, but both use the same app-data directory. Alternatively, hold Linux hosts on 1.4.5.

  1. tanstack-source added labelsbug

  2. Same issue on the managed 1.5.10 runtime (T3 0.1.10, Linux x64, T3 service started without DISPLAY / WAYLAND_DISPLAY, no usable Secret Service keyring). The symptoms differ a little from the 1.5.8 report, so here are the details.

    What happened

    1. The instance was signed in with oauth-personal on 1.4.5. The token was in <profile>/antigravity-acp/acp_token.json.
    2. T3 installed the 1.5.10 runtime automatically, and every new session failed from then on:
      ACP authenticate: methodId="oauth-personal"
      Failed to load stored token from keyring, falling back to file: The name is not activatable
      ... You are not logged into Antigravity.
      authenticate("oauth-personal") failed: No browser is available here (no graphical display is available to open a browser). Run `agy acp --login` in a terminal on this machine, then retry; or use a Gemini API key. (code -32603)
      The thread reports ProviderAdapterOpenSessionError: Failed to open antigravity provider session ....
    3. Settings → Antigravity → Retry sign-in fails right away with the same -32603 "no graphical display" error. On 1.5.10 the keyring step fails at once (no 5 s timeout), and sign-in errors out at once (no 30 s "has not reached Google"; compare #36034). The runtime refuses to use the BROWSER helper when no display is present, so T3 never receives the sign-in URL.

    Workaround that worked

    Run the terminal login against T3's profile, with the same environment T3 uses:

    P=<stateDir>/providers/antigravity/<instance-key>
    GEMINI_HOME=$P AGY_ACP_FORCE_FILE_STORAGE=1 \
      ~/.t3/tools/antigravity-acp/linux-x64/versions/<release-id>/antigravity \
      acp --login --gemini-dir "$P" --app-data-dir antigravity-acp

    This wrote <profile>/antigravity-acp/antigravity-oauth-token, and the following ACP sessions authenticated. The old acp_token.json is still next to it, and the 0.1.10 usage probe (makeAntigravityUsageProbe) still reads only acp_token.json (#34327), so usage limits may keep using the stale 1.4.5 token.

  3. Also reproduced updating from the older managed 1.3.0 runtime (not just 1.4.5) straight to 1.5.12, on T3 0.1.10 / Linux x64 running as a service without a display. Same -32603 "No browser is available here" behind the generic ProviderAdapterOpenSessionError, so 1.5.12 still doesn't carry the old sign-in over.

    An alternative workaround that needs no new Google sign-in: if the host's own agy CLI is already signed in, copying its token into the instance profile works:

    install -m600 ~/.gemini/antigravity-cli/antigravity-oauth-token \
      <stateDir>/providers/antigravity/<instance-key>/antigravity-acp/antigravity-oauth-token

    Verified with 1.5.12 launched the way T3 launches it (acp --gemini-dir <profile> --app-data-dir antigravity-acp, no DISPLAY): authenticate("oauth-personal") succeeds and session/new opens. The instance and the CLI then share one Google sign-in. That also suggests a migration path for the fix: when the profile has no antigravity-oauth-token, T3 could offer to import the host CLI's sign-in.

  4. I tried to reproduce this on the current build and could not.

    Commit 14d57b451e (origin/main). Full app flow not run: it needs an instance signed in with a Google account (oauth-personal) on the managed 1.4.5 runtime, and there is no Google sign-in on the VM. Runtime half verified: launched the agy 1.5.12 native CLI the way T3 launches it (GEMINI_HOME=, AGY_ACP_FORCE_FILE_STORAGE=1, agy acp --gemini-dir <profile> --app-data-dir antigravity-acp, no DISPLAY, no D-Bus session) under strace -f -e trace=openat, with a synthetic /antigravity-acp/acp_token.json present. Sent ACP initialize, then authenticate(oauth-personal). strace showed two opens of /antigravity-acp/antigravity-oauth-token (ENOENT) and no open of acp_token.json. authenticate failed at once with -32603 'No browser is available here ... Run agy acp --login in a terminal'. Code check: AntigravityInstallation.ts (the legacy-to-native migration, covered by the test 'migrates the legacy managed runtime to the native CLI') never touches the profile's token files, and nothing resets auth status after an update. antigravityAuthSupport.ts:385 and antigravityUsageLimits.ts:220 still point at acp_token.json only.

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

  5. juliusmarminge closed this

  6. Still happens on T3 0.1.11-nightly.20261119.4941, on 3 machines at once. Exact steps and version below, as asked.

    The runtime check in the closing comment shows the bug itself: 1.5.12 opens only antigravity-oauth-token (ENOENT) and never opens acp_token.json, so authenticate fails with -32603. A profile signed in on the old runtime has only acp_token.json, so after the update nothing can be read.

    Versions

    • T3 desktop 0.1.11-nightly.20261119.4941 (it was 0.1.10-nightly.20261116 before the restart).
    • On restart, T3 installed the managed runtime release 26de25fc… (the native antigravity binary, Language server version 1.5.12). The previous release 9fb60956… was the agy_acp_server.par + localharness_external runtime.

    Steps

    1. Sign in the Antigravity instance (oauth-personal) on the old managed runtime, on machines with no usable keyring. The token is in <profile>/antigravity-acp/acp_token.json.
    2. Restart T3 so it updates to 0.1.11-nightly and the new managed runtime above is installed.
    3. T3's model refresh runs ("Could not check provider updates").

    Result

    • Every such machine shows "Sign in to Antigravity in provider settings before refreshing models.", and new turns fail. The affected machines:
      • Linux x64 with a locked login keyring (Failed to load stored token from keyring, falling back to file: failed to unlock correct collection '/org/freedesktop/secrets/collection/login').
      • Linux x64 under WSL2 (same log lines).
      • macOS arm64 reached as a linked environment over SSH (Using file-based token storage because SSH session detected). So this is not only Linux.
    • Then: authenticate("oauth-personal") failed: No browser is available here ... Run 'agy acp --login' in a terminal on this machine (-32603).
    • On each machine, acp_token.json has a valid refresh token: Google's token endpoint returns 200 for it. <profile>/antigravity-acp/antigravity-oauth-token does not exist.
    • A desktop machine with an unlocked keyring was not affected.

    Workaround (verified on all 3 machines) Write <profile>/antigravity-acp/antigravity-oauth-token (mode 600) from the profile's own acp_token.json, in the format 1.5.x stores:

    {"token":{"access_token":"","token_type":"Bearer","refresh_token":"<refresh_token from acp_token.json>","expiry":"2000-01-01T00:00:00Z","expires_in":0},"auth_method":"consumer","id_token_email":"<account email>"}

    After that, antigravity acp --gemini-dir <profile> --app-data-dir antigravity-acp with T3's environment answers authenticate(oauth-personal) with the account tier. No new Google sign-in is needed.

    Suggested fix When T3 switches a profile to the native runtime and antigravity-oauth-token is missing but acp_token.json exists, write antigravity-oauth-token as above. Also, the usage probe (antigravityUsageLimits.ts) and antigravityAuthSupport.ts should read antigravity-oauth-token (#34327 / #39112).

Sign in to join this conversation.