Bug & Fix Report: Antigravity IDE Wizard Migration Failure & UI Access Restore
1. Issue Summary
During the update of Antigravity to version 2.0.1, a critical failure occurred in the IDE migration wizard. The update process is designed to migrate user data and split the application into a launcher (Antigravity Hub) and the full IDE (Antigravity IDE).
However, two major bugs prevented this migration from completing:
- The Symlink Race Condition (
EEXIST): The language server and the Electron GUI both attempted to migrate and establish symlinks for mcp_config.json at the same time. The language server created the file first, causing the Electron installer to fail with EEXIST (file already exists) and abort.
- Circular Symlink Loop (
too many levels of symbolic links): After the initial failure, the configuration state was left corrupted, with ~/.gemini/config/mcp_config.json pointing to itself/~/.gemini/antigravity/mcp_config.json in a circular loop. This caused the language server to throw errors and disabled the File Explorer and Terminal inside the UI.
Additionally, the Electron app marked ide-install-wizard-shown as true in its local settings despite the failure, leaving the user permanently stuck with a broken Hub interface.
2. Root Cause Analysis
A. The Race Condition
When the application starts, it launches the gRPC Language Server and the Electron browser environment. Both execute migration routines:
- Language Server (
migrate.go): Checks if ~/.gemini/config/.migrated exists. If not, it attempts to migrate mcp_config.json to the shared ~/.gemini/config/ directory.
- Electron GUI (
main.js): Checks if ide-install-wizard-shown is true. If not, it attempts to copy user data to ~/.gemini/antigravity-ide and symlink /Users/andlibsaif/.gemini/config/mcp_config.json to /Users/andlibsaif/.gemini/antigravity-ide/mcp_config.json.
Because the Language Server ran faster, it created ~/.gemini/config/mcp_config.json first. When Electron attempted to create its symlink at the same path, it crashed with:
[error] [IDE Wizard] Background download/install failed: Error: EEXIST: file already exists, symlink '/Users/andlibsaif/.gemini/config/mcp_config.json' -> '/Users/andlibsaif/.gemini/antigravity-ide/mcp_config.json'
B. The Symlink Corruption
Due to the aborted installation, the symlinks for mcp_config.json were incorrectly pointed:
~/.gemini/config/mcp_config.json pointed to itself.
~/.gemini/antigravity/mcp_config.json pointed to ~/.gemini/config/mcp_config.json.
This resulted in:
failed to stat mcp config file: stat /Users/andlibsaif/.gemini/config/mcp_config.json: too many levels of symbolic links
Which completely blocked the loading of the user workspace and terminal elements.
3. Resolution & Fix Steps Implemented
The following steps were executed to restore the workspace and complete the migration:
Step 1: Cleaned the Corrupt Directories & Symlinks
We deleted the partially migrated, corrupted folders:
rm -rf /Users/andlibsaif/.gemini/antigravity-ide
rm -rf /Users/andlibsaif/.gemini/antigravity-backup
- Removed all circular symlinks for
mcp_config.json.
Step 2: Wrote a Clean, Valid Configuration
We replaced the circular links in the source folder (~/.gemini/antigravity/mcp_config.json) with a clean, real configuration file enabling the user’s MCP servers (such as chrome-devtools-mcp, prisma-mcp-server, sequential-thinking, etc.).
Step 3: Prevented the Race Condition
We manually created the empty marker /Users/andlibsaif/.gemini/config/.migrated. This instructed the Language Server to bypass its migration steps on boot, leaving the path clear for the Electron installer.
Step 4: Reset the Electron Installer Wizard State
We modified the Electron local settings file at /Users/andlibsaif/Library/Application Support/Antigravity/app_storage.json, resetting the installation flag:
"ide-install-wizard-shown": "false"
Step 5: Ran the Installer & Launched the IDE
After restarting, the IDE Installer Wizard successfully executed the migration from scratch without colliding. We then established the correct, non-circular symlink hierarchy:
~/.gemini/antigravity/mcp_config.json $\rightarrow$ ~/.gemini/config/mcp_config.json
~/.gemini/config/mcp_config.json $\rightarrow$ ~/.gemini/antigravity-ide/mcp_config.json (Real file)
Finally, we launched the correct binary: /Applications/Antigravity IDE.app.
4. Verification
We verified that the full IDE is now running correctly:
- The Antigravity IDE process is active.
- The internal language server is running using the correct data directory (
--app_data_dir antigravity-ide).
- The File Explorer, Terminal, and project views are now fully functional and accessible in the user interface.