Hello team,
I encountered a critical crash in the Antigravity desktop client during the OAuth login flow on Windows. I managed to identify the root cause and implemented a temporary workaround, but this requires a proper fix in the core codebase.
Description
When authenticating the application, the browser successfully completes the authorization and redirects back to the app via the antigravity://oauth-success/ protocol. However, the application fails to process the callback. The main process throws an uncaught TypeError because the underlying code uses JSON.stringify() on a payload or state object that contains a BigInt value.
Environment
- OS: Windows 10/11 (win32-x64)
- Version/Commit:
135ccf460c67c4b900
Steps to Reproduce
- Launch Antigravity and trigger the sign-in flow.
- Complete the OAuth verification in the browser.
- The browser attempts to redirect to the app (
antigravity://oauth-success/...). - The application window becomes unresponsive to the login success, and the logs reveal a main process crash.
Error Logs
[main 2026-03-26T03:52:40.540Z] app#handleProtocolUrl(): antigravity://oauth-success/ { originalUrl: 'antigravity://oauth-success/' }
[main 2026-03-26T03:52:40.540Z] URLHandlerRouter#routeCall() with URI argument antigravity://oauth-success/
[main 2026-03-26T03:52:41.671Z] [uncaught exception in main]: TypeError: Do not know how to serialize a BigInt
[main 2026-03-26T03:52:41.671Z] TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
at vD (file:///D:/Antigravity/resources/app/out/main.js:31:11765)
at nve.o (file:///D:/Antigravity/resources/app/out/main.js:31:14636)
at nve.m (file:///D:/Antigravity/resources/app/out/main.js:31:14511)
Workaround / Suggested Fix
I was able to bypass the crash and successfully log in by injecting the following polyfill at the very beginning of resources/app/out/main.js:
JavaScript
BigInt.prototype.toJSON = function() { return this.toString(); };
To permanently fix this, please either implement a replacer function in the JSON.stringify calls that handle the auth payload/storage, or apply a similar polyfill globally.
Thank you!