When attempting to sign in to the Antigravity desktop app via Google OAuth, the app fails to open the browser for authentication. No visible error is shown in the user interface, but the login process silently stalls.
To understand what is happening behind the scenes, you can run the application with Node's inspector attached.
Step 1: Open PowerShell or Command Prompt. Step 2: Navigate to the Antigravity installation folder:
cd "C:\Users\$env:USERNAME\AppData\Local\Programs\Antigravity"Step 3: Launch the app with the debugger flag:
.\Antigravity.exe --inspect=9229When you click "Sign in with Google", you would normally expect the app to spin up a local auth server and log an [Auth] port. Instead, the terminal immediately throws the following fatal crash:
[uncaught exception in main]: TypeError: Do not know how to serialize a BigInt
The app's background processes are attempting to convert a BigInt data type into JSON string format. Because JavaScript's native JSON.stringify() does not know how to handle BigInt values by default, it throws a TypeError and crashes the authentication sequence before the browser can even launch.
To fix this, we need to apply a small patch to the app's core JavaScript file to teach it how to safely serialize BigInt values.
Choose your operating system below:
Ensure Antigravity and any associated terminal windows are completely closed.
Open Notepad, or your preferred code editor.
Go to File > Open. Ensure the file type is set to All Files (*.*).
Navigate to and open the following file, replacing <YourUsername> with your actual Windows username:
C:\Users\<YourUsername>\AppData\Local\Programs\Antigravity\resources\app\out\main.js
The main.js file is minified, so you will see a massive block of text. You only need to edit the very beginning of the file.
Place your cursor at Line 1, right after the opening copyright comment ends, and inject this exact prototype function:
BigInt.prototype.toJSON = function() { return this.toString(); };Before:
/*!--------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/var O5n=Object.creAfter:
/*!--------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/BigInt.prototype.toJSON = function() { return this.toString(); }; var O5n=Object.creSave the file and launch Antigravity normally.
Note: On Linux, the main.js file is in a protected system directory (/usr/share/) and is minified into a single, massive line of code. Opening it in standard GUI text editors like Gedit or Nano will often cause them to freeze or crash. The fastest and safest way to apply the fix is entirely through the terminal.
Ensure the Antigravity app is completely closed.
Open your terminal and run the following commands one by one. This will create a backup, inject the fix at the top of the file, and replace the broken original. (You will be prompted for your sudo password).
# Navigate to the app's core directory
cd /usr/share/antigravity/resources/app/out/
# Create a safe backup of the original file
sudo cp main.js main.js.backup
# Create a temporary file with our BigInt fix at the very top
echo "BigInt.prototype.toJSON = function() { return this.toString(); };" > /tmp/fixed_main.js
# Append the massive original file to the bottom of our new temporary file
cat main.js >> /tmp/fixed_main.js
# Replace the broken original file with our newly fixed file
sudo mv /tmp/fixed_main.js main.jsLaunch Antigravity normally from your terminal or application menu.
When you click "Sign in with Google", the app will now gracefully bypass the telemetry crash, launch your default web browser, and successfully capture the OAuth callback.
If Antigravity receives a major software update, this file may be overwritten. You may need to reapply this patch if the developers have not addressed the bug upstream.
you are welcome!