Antigravity OAuth Errors — Fix 'Version No Longer Supported' and Authentication Issues
Fix the 'This version of Antigravity is no longer supported' error and other Google Antigravity OAuth issues. Includes user-agent patch fix and multi-account setup.
⚠️ The Problem
🔍 Why This Happens
@mariozechner/pi-ai library (which handles Antigravity) has a hardcoded User-Agent set to antigravity/1.11.5 which Google no longer accepts. Other causes include: OAuth tokens expiring, incorrect Gmail OAuth configuration placement in config files, or using browser session tokens instead of proper setup tokens.✅ The Fix
## Fix 'Version No Longer Supported' Error This is the most common Antigravity issue. Google blocked the old User-Agent version. Here's how to fix it:
### Step 1: Locate the File to Patch The User-Agent is hardcoded in the pi-ai library. Find it based on your OS:
Windows (npm install):
``
C:\Users\YOURUSER\AppData\Roaming\npm\node_modules\openclaw\node_modules\@mariozechner\pi-ai\dist\providers\google-gemini-cli.js
Windows (pnpm):
``
C:\Users\YOURUSER\AppData\Local\pnpm\global\5\node_modules\openclaw\node_modules\@mariozechner\pi-ai\dist\providers\google-gemini-cli.js
macOS/Linux (npm):
``bash
~/.npm-global/lib/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/providers/google-gemini-cli.js
macOS/Linux (source build):
``bash
~/moltbot-ref/node_modules/.pnpm/@mariozechner+pi-ai@0.45.3_*/node_modules/@mariozechner/pi-ai/dist/providers/google-gemini-cli.js
### Step 2: Edit the User-Agent Open the file and find this line (around line 26):
"User-Agent": "antigravity/1.11.5 darwin/arm64",Change it to:
"User-Agent": "antigravity/1.15.8 darwin/arm64",### Step 3: Restart the Gateway
openclaw gateway restart# orclawdbot gateway restartThat's it! The error should be resolved.
## Alternative: Switch to Direct Gemini API If patching doesn't work or you want a more stable solution, use a direct Gemini API key instead of Antigravity:
clawdbot configureSelect Google Gemini (direct API) instead of Antigravity. You'll need a Gemini API key from https://aistudio.google.com/apikey
Model IDs for direct Gemini:
- google-gemini/gemini-1.5-pro
- google-gemini/gemini-1.5-flash (cheaper/faster)
- google-gemini/gemini-2.0-flash-exp
## Fix Gmail OAuth Configuration Errors
If you see: error: too many arguments for 'setup'. Expected 0 arguments but got 1.
The Gmail OAuth config goes at the root level of your config file, NOT inside skills.entries:
Correct placement in `~/.clawdbot/config.json5`:
{ "meta": { ... }, "models": { ... }, // Gmail config at ROOT level "gmail": { "clientId": "YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com", "clientSecret": "YOUR_GOOGLE_CLIENT_SECRET" }, "channels": { ... }, "skills": { ... }}Google Cloud Console Setup:
1. Create a project at https://console.cloud.google.com/
2. Enable Gmail API
3. Create OAuth 2.0 credentials (Desktop app type)
4. Add http://127.0.0.1:5316 as authorized redirect URI
5. Download client ID and secret
Then authenticate:
clawdbot gmail login## Fix OAuth Token Errors (API Key vs Setup Token)
If you see: HTTP 401: authentication_error: invalid x-api-key
Use the correct token type:
- ✅ Use sk-ant-oat01-... tokens (from claude setup-token)
- ❌ Don't use sk-ant-sid02-... tokens (browser session cookies - they're short-lived and fragile)
To get the correct token:
claude setup-tokenThis generates a proper OAuth token that won't expire randomly.
## Setting Up Multiple Antigravity Accounts
If you see: Profile google-antigravity:email@gmail.com timed out (possible rate limit). Trying next account...
OpenClaw supports multiple Google accounts for failover. Configure in auth-profiles.json:
{ "google-antigravity": [ { "email": "account1@gmail.com", "token": "..." }, { "email": "account2@gmail.com", "token": "..." } ]}When one account hits rate limits, OpenClaw automatically tries the next account.
To add a second account:
clawdbot configure# Select Google Antigravity# Log in with your second Google account# It will be added to the profile list## Rate Limit Cooldowns
Antigravity has aggressive rate limits. If you keep hitting cooldowns:
1. Add more accounts for failover (see above)
2. Reduce request frequency - space out your requests
3. Use a fallback model - configure a backup like OpenRouter:
``json5
{
agents: {
defaults: {
model: {
primary: "google-antigravity/gemini-2.0-flash-exp",
fallbacks: ["openrouter/google/gemini-2.0-flash-exp:free"]
}
}
}
}
## Full Troubleshooting Checklist
# 1. Check your versionopenclaw --version# 2. Check gateway statusopenclaw status --all# 3. Probe the Antigravity provideropenclaw models status --probe --probe-provider google-antigravity# 4. Watch logs for errorsopenclaw logs --follow# 5. Restart after any config changesopenclaw gateway restart🔥 Your AI should run your business, not just answer questions.
We'll show you how.$97/mo (going to $197 soon)
📋 Quick Commands
| Command | Description |
|---|---|
| openclaw gateway restart | Restart the gateway after patching the User-Agent |
| clawdbot configure | Re-run configuration wizard to refresh OAuth tokens |
| clawdbot gmail login | Start Gmail OAuth authentication flow |
| claude setup-token | Generate a proper OAuth token (not browser session) |
| openclaw models status --probe | Test connection to configured model providers |
| openclaw status --all | Show full diagnostic status including auth |
| openclaw logs --follow | Watch gateway logs in real-time for auth errors |
Related Issues
📚 You Might Also Like
Microsoft Outlook
Enterprise-grade integration with Microsoft 365 and Exchange Online. Manage email, calendar, and meetings with full Azure AD authentication and compliance support.
The ChatGPT Memory Problem (And How to Fix It)
"I just told you this yesterday!" Every ChatGPT user knows this frustration. Here's why ChatGPT forgets, why the Memory feature doesn't really fix it, and what actually works.
How to Update OpenClaw (3 Easy Methods)
Keep your AI assistant running the latest version. Three ways to update — from one-word commands to manual CLI.
GitHub
Manage repositories, issues, pull requests, and actions through natural conversation. Development workflow in your chat.
🐙 Your AI should run your business.
Weekly live builds + template vault. We'll show you how to make AI actually work.$97/mo (going to $197 soon)
Join Vibe Combinator →