CodexBar icon indicating copy to clipboard operation
CodexBar copied to clipboard

Antigravity status probe rejects self-signed 127.0.0.1 cert (TLS error)

Open soumikbhatta opened this issue 7 months ago • 2 comments

Symptom

With Antigravity (v1.22.2+, current Google Antigravity IDE) signed in and its language server running on 127.0.0.1:63079/63080, CodexBar's AntigravityStatusProbe fails every poll with:

``` Port probe failed error=The certificate for this server is invalid. You might be connecting to a server that is pretending to be "127.0.0.1" which could put your confidential information at risk. port=63079 Port probe failed error=A TLS error caused the secure connection to fail. port=63080 ```

Expected

Per `docs/antigravity.md` (line 71):

Local HTTPS uses a self-signed cert; the probe allows insecure TLS.

Actual

In CodexBar 0.20 (signed, brew cask install), the probe's `URLSession` rejects the self-signed localhost cert. No `URLAuthenticationChallenge` delegate appears to be attached, or the attached one isn't accepting NSURLAuthenticationMethodServerTrust for host 127.0.0.1.

Environment

  • macOS 26.4 (Darwin 25.3.0)
  • CodexBar 0.20 (brew cask, signed by TeamIdentifier Y5PE65HELJ)
  • Antigravity.app 1.22.2
  • Electron process PID listens on unix socket + TCP ports 63079/63080
  • Ports discovered correctly by CodexBar (confirmed in log)

Workaround

Disabled the Antigravity toggle locally. Will re-enable once the cert issue is fixed.

Suggested fix

In `AntigravityStatusProbe.swift`, the URLSession used for the port probe should use a `URLSessionDelegate` whose `urlSession(_:didReceive:completionHandler:)` returns `.useCredential` with `URLCredential(trust: challenge.protectionSpace.serverTrust!)` whenever `challenge.protectionSpace.host == "127.0.0.1"`.

soumikbhatta avatar Apr 17 '26 09:04 soumikbhatta

Closing as fixed on current main. The Antigravity local probe now has an explicit localhost trust policy that accepts server-trust challenges only for loopback hosts (127.0.0.1 / localhost), matching the self-signed local HTTPS behavior described here. I verified the focused coverage with swift test --filter AntigravityStatusProbeTests: 30 tests passed, including localhost trust policy only accepts local server trust challenges and endpoint fallback cases. If this still reproduces on a current build, please open a fresh issue with the current logs and Antigravity version.

steipete avatar May 10 '26 13:05 steipete

@steipete Is it correct that the Language_server.exe is still not signed?

Amnessie avatar Oct 26 '26 14:10 Amnessie