Unable to sign in on Windows 11 (build 26300) — "x509: certificate signed by unknown authority" on oauth2.googleapis.com/token

Subject: Unable to sign in on Windows 11 (build 26300) — “x509: certificate signed by unknown authority” on oauth2.googleapis.com/token

Hi Antigravity team,

I can’t sign in to Antigravity on one specific machine. Every login attempt fails with:

“There was an unexpected issue setting up your account.
Post “https://oauth2.googleapis.com/token”: tls: failed to verify certificate: x509: certificate signed by unknown authority”

The same account signs in successfully on a colleague’s device, so the problem seems specific to my machine.

ENVIRONMENT

  • OS: Windows 11 Home Single Language, version 26H2, OS build 26300.9457 (Windows Insider / preview build)
  • CPU: Intel Core i5-10300H, 16 GB RAM, x64
  • No antivirus, VPN, or corporate/campus network in use

WHAT I HAVE ALREADY TRIED (all still fail)

  1. Different Google accounts
  2. Different web browsers for the browser login step
  3. Different Wi-Fi networks and a mobile hotspot
  4. Windows root certificates: ran certutil -generateSSTFromWU, imported roots, and manually installed Google Trust Services roots (GTS Root R1 and R2) into the Local Machine Trusted Root store. Verified with Get-ChildItem Cert:\LocalMachine\Root; GTS Root R1/R2/R3 are present
  5. Restarted the laptop after the certificate changes
  6. Synced system date/time; flushed DNS (ipconfig /flushdns)
  7. Checked for proxies: HTTP(S)_PROXY / ALL_PROXY env vars are empty, “netsh winhttp show proxy” reports direct access, and ProxyEnable=0 with no AutoConfigURL in Internet Settings
  8. Checked that automatic root update is not disabled (the AuthRoot policy registry key is empty)
  9. Renamed %APPDATA%\Antigravity and re-tried a fresh login

DIAGNOSTICS THAT SHOW THE NETWORK AND WINDOWS CERT STORE LOOK HEALTHY

  • curl.exe -v https://oauth2.googleapis.com/token completes the TLS handshake via schannel and returns HTTP 404 (expected for a GET)
  • A .NET SslStream connection to oauth2.googleapis.com (and directly to 142.251.10.95:443, the IP seen in the logs) returns a valid certificate with Issuer: CN=WR2, O=Google Trust Services, C=US, and no validation error
  • So only Antigravity’s own (Go) network stack fails to verify the certificate; Windows itself trusts it

LOG FINDINGS (%APPDATA%\Antigravity\logs\language_server.log)

  • About 1,000 occurrences of “tls: failed to verify certificate: x509: certificate signed by unknown authority”, all to googleapis.com hosts: oauth2.googleapis.com, daily-cloudcode-pa.googleapis.com, cloudcode-pa.googleapis.com
  • Earlier in the same session there was one connection reset: “read tcp 10.28.109.16 → 142.251.10.95:443: wsarecv: An existing connection was forcibly closed”, after which every request failed with the x509 error
  • An earlier session also showed oauth2 “invalid_grant” errors (stale token), which I cleared by resetting the app data folder
    (Full log attached.)

QUESTIONS

  1. Is there a known issue with certificate verification on Windows Insider builds (26300) or with Go’s system cert pool on Windows?
  2. Is there a supported way to point Antigravity at the system certificate store, or a flag/env var to diagnose which certificate it receives?
  3. Is there anything else I should collect to help you debug (e.g., a verbose log setting)?

Thank you for your help.

Hi @hanara,

Welcome to the Forum,

To point Antigravity’s TLS verifier to a trusted certificate bundle for oauth2.googleapis.com on Windows 11:

  1. In PowerShell, run Get-ChildItem Env:SSL_CERT* to check whether SSL_CERT_FILE or SSL_CERT_DIR is set by another tool. In Go applications like Antigravity, these variables completely override the native Windows certificate store.
  2. If either variable is set to an outdated bundle, you can instruct Go to fall back to the Windows system store by setting the environment variable GODEBUG=x509sslcertoverrideplatform=0 and relaunching Antigravity.
    • Alternatively, if you no longer need the override, you can clear the variables. (Note: if they were set system-wide, clearing them requires an Administrator PowerShell: [Environment]::SetEnvironmentVariable("SSL_CERT_FILE", $null, "Machine")).
  3. If neither variable was set, or if you prefer to explicitly provide the Google certificates, download the Google Trust Services root PEM bundle from https://pki.goog/roots.pem to a local folder like $env:USERPROFILE\certs\roots.pem. Then, run [Environment]::SetEnvironmentVariable("SSL_CERT_FILE", "$env:USERPROFILE\certs\roots.pem", "User"), and relaunch Antigravity from a new terminal session.

If sign-in still fails after step 3, reply here with the output of openssl s_client -connect oauth2.googleapis.com:443 -showcerts.

Solved for me (the same problem). Thanks.