I encountered a login failure in Antigravity Desktop on Windows 11 where Google authentication succeeded in the browser, but the app never logged in.
After checking the logs I found the root cause.
Error in main.log:
TypeError: Do not know how to serialize a BigInt
Stack trace points to:
resources/app/out/main.js
This happens because Antigravity tries to store OAuth token metadata using JSON.stringify(), but some values are stored as JavaScript BigInt. JSON cannot serialize BigInt values, which causes the app to crash before saving authentication.
Workaround (Windows)
- Navigate to the Antigravity installation folder:
C:\Users<username>\AppData\Local\Programs\Antigravity\resources\app\out
- Backup the file:
main.js
-
Open main.js in a code editor.
-
Add the following patch at the very top of the file:
BigInt.prototype.toJSON = function () {
return this.toString();
};
-
Save the file.
-
Restart Antigravity and login again.
Result
The OAuth login completes successfully and the application no longer crashes.
Notes
This workaround simply converts BigInt values to strings during JSON serialization and prevents the Electron runtime from throwing the exception.
Hopefully this helps others hitting the same login crash on Windows.