Troubleshooting Hub
Don't panic. Here is how to fix the most common Antigravity bugs and errors.
Understanding Antigravity IDE Issues
Antigravity IDE, being at the forefront of AI-powered development, occasionally encounters unique challenges. Most issues stem from the complex interaction between the AI models, your local environment, and network conditions. Understanding these root causes helps you resolve problems faster and prevent them from recurring.
Common Issue Categories
🔴 Critical Issues
Installation failures, authentication problems, and complete IDE crashes. These prevent you from using Antigravity entirely and require immediate attention.
🟡 Performance Issues
Slow response times, high memory usage, and lag in the editor. These affect productivity but don't completely block your work.
🔵 AI Model Issues
Rate limiting (429 errors), context window problems, and hallucination issues. These relate to the AI model's behavior and API limits.
Troubleshooting Best Practices
- Check the basics first: Ensure your internet connection is stable, Antigravity is updated to the latest version, and you have sufficient system resources (RAM and disk space).
- Review error messages carefully: Antigravity provides detailed error codes and messages. The error code (like AG-001 or AG-429) directly maps to specific solutions in our database.
- Enable diagnostic logging: Go to Settings → Developer → Enable Diagnostic Logs. This captures detailed information that helps identify the root cause of complex issues.
- Test in isolation: If an issue occurs in a specific project, try creating a new minimal project to determine if the problem is project-specific or system-wide.
- Document the context: When seeking help, note your OS version, Antigravity version, error messages, and the steps that led to the issue. This speeds up diagnosis significantly.
Quick Fixes for Top Issues
🔥 Model Overloaded (429 Error)
This is the most common issue when Gemini 3 servers are at capacity.
Alternative: Enable "Auto-fallback" to automatically switch models when rate limited
⚠️ Installation Fails on Windows
Windows installations often fail due to WSL2 requirements.
Then: wsl --set-default-version 2
Finally: Restart your computer and retry installation
💾 High Memory Usage
Antigravity can consume significant RAM with large projects.
Also: Disable "Index entire workspace" for projects over 50K files
Pro tip: Use .antigravityignore to exclude node_modules and build folders
深度诊断指南
系统环境诊断
在深入特定问题之前,了解和验证系统环境是解决Antigravity IDE问题的关键第一步。 系统环境包括操作系统配置、硬件资源、网络条件和依赖组件的状态。
Windows系统诊断
Windows用户经常遇到WSL2相关问题,这是Antigravity在Windows上运行的核心依赖。
检查命令序列
# 检查WSL状态 wsl --status wsl --list --verbose # 检查虚拟化支持 dism.exe /online /get-featureinfo /featurename:Microsoft-Windows-Subsystem-Linux dism.exe /online /get-featureinfo /featurename:VirtualMachinePlatform # 检查Hyper-V状态 bcdedit /enum | findstr hypervisorlaunchtype # 验证内存和磁盘空间 wmic OS get TotalVisibleMemorySize,FreePhysicalMemory /value fsutil volume diskfree C:
如果任何检查失败,说明系统环境不满足Antigravity的运行要求。 WSL2必须是版本2,虚拟化功能必须启用,推荐至少16GB RAM和50GB可用磁盘空间。
macOS系统诊断
macOS通常提供最稳定的Antigravity体验,但仍需验证基础环境配置。
系统检查命令
# 检查系统版本和架构 sw_vers uname -m # 检查可用资源 sysctl hw.memsize hw.ncpu df -h / # 检查开发者工具 xcode-select --version which git node npm # 检查安全设置 spctl --status csrutil status
特别注意M1/M2芯片的兼容性。某些扩展和依赖可能需要Rosetta 2支持。 确保Xcode Command Line Tools已安装,这是许多开发工具的基础依赖。
Linux系统诊断
Linux发行版差异较大,需要检查发行版特定的依赖和配置。
通用检查命令
# 检查发行版信息 lsb_release -a cat /etc/os-release # 检查内核和架构 uname -a lscpu | grep Architecture # 检查依赖包 dpkg -l | grep -E "(curl|git|build-essential)" # 或对于Red Hat系列: rpm -qa | grep -E "(curl|git|gcc)" # 检查系统资源 free -h df -h /tmp /var /home # 检查网络连接 ping -c 3 api.gemini.google.com curl -I https://api.anthropic.com
Ubuntu/Debian用户确保build-essential包已安装。 CentOS/RHEL用户需要Development Tools组。某些防火墙配置可能阻止AI API访问。
网络连接诊断
Antigravity IDE严重依赖网络连接来访问AI模型API。网络问题是导致功能异常的主要原因之一, 包括超时错误、间歇性失败和性能下降。理解如何诊断和优化网络连接至关重要。
API连接性测试
测试到各个AI服务API的连接性能,识别网络瓶颈和连接问题。
连接延迟测试
# 测试Google Gemini API
curl -w "%{time_total}\n" -o /dev/null -s \
https://generativelanguage.googleapis.com/
# 测试Anthropic Claude API
curl -w "%{time_total}\n" -o /dev/null -s \
https://api.anthropic.com/
# 测试OpenAI API
curl -w "%{time_total}\n" -o /dev/null -s \
https://api.openai.com/正常情况下延迟应小于500ms。超过1000ms表明网络连接存在问题。
带宽测试
# 下载速度测试(使用大文件)
curl -w "%{speed_download}\n" -o /dev/null -s \
https://files.pythonhosted.org/packages/large-file
# 上传速度测试(模拟代码上传)
time curl -X POST -H "Content-Type: application/json" \
-d @large-test-file.json \
https://httpbin.org/postAntigravity需要稳定的上传带宽来发送代码上下文。推荐至少1Mbps上传速度。
代理和防火墙配置
企业环境通常有代理服务器和防火墙限制。确保以下域名被允许访问:
- *.googleapis.com (Gemini API)
- *.anthropic.com (Claude API)
- *.openai.com (GPT API fallback)
- *.antigravity.dev (IDE updates and extensions)
- *.google.com (Authentication)
性能问题深度分析
性能问题往往有多重原因,包括硬件资源不足、配置不当和代码库特性。 系统化的性能分析可以帮助确定具体瓶颈并制定针对性的优化策略。
内存使用分析
Antigravity的内存使用主要来源于代码索引、AI模型缓存和编辑器状态。 了解内存分配模式有助于优化配置。
内存监控工具
Help → Performance Diagnostics → Memory Usage
Windows: 任务管理器 → 详细信息 → Antigravity.exe
macOS: 活动监视器 → Antigravity
Linux: htop 或 ps aux | grep antigravity
内存优化策略
- 减少上下文窗口大小(设置 → AI → Context Size)
- 禁用大型项目的全量索引(设置 → 索引 → 选择性索引)
- 关闭未使用的扩展和插件
- 定期清理缓存(设置 → 高级 → 清理所有缓存)
- 限制同时打开的文件数量
磁盘IO性能分析
磁盘IO性能直接影响项目加载速度、文件保存响应和索引构建时间。 特别是在处理大型代码库时,磁盘性能成为关键瓶颈。
磁盘性能测试
# Windows: 使用CrystalDiskMark或命令行
fsutil file createnew testfile 1073741824
powershell "Measure-Command { Copy-Item testfile testfile2 }"
# macOS/Linux: 使用dd命令测试
dd if=/dev/zero of=testfile bs=1M count=1024 conv=fdatasync
dd if=testfile of=/dev/null bs=1M count=1024
# 检查SSD健康状态
# Windows: wmic diskdrive get status
# macOS: system_profiler SPStorageDataType
# Linux: sudo smartctl -a /dev/sdaSSD读写速度应超过100MB/s。机械硬盘可能导致明显的性能问题, 特别是在大项目中。建议将Antigravity安装在SSD上。
CPU使用率优化
Antigravity的CPU密集型操作包括代码分析、语法高亮和AI推理。 合理配置可以平衡性能和系统稳定性。
CPU监控方法
观察Antigravity在不同操作下的CPU使用模式:
- 项目加载时:应在30秒内降至正常水平
- 代码编辑时:应保持在20%以下
- AI推理时:可能达到50-80%,但应在10秒内完成
- 空闲时:应保持在5%以下
CPU优化配置
- 设置 → 性能 → 工作线程数量(推荐CPU核心数-2)
- 禁用实时语法检查对大文件
- 延迟AI建议触发时间(设置为500ms+)
- 限制并发AI请求数量
高级故障排除技巧
日志分析与调试
Antigravity IDE提供了多层级的日志系统,从基础的操作日志到详细的调试信息。 掌握如何有效分析这些日志是快速定位问题的关键技能。
日志文件位置和类型
Windows日志位置
%APPDATA%\Antigravity\logs\ ├── main.log # 主进程日志 ├── renderer.log # 界面渲染日志 ├── extension.log # 扩展运行日志 ├── ai-service.log # AI服务调用日志 └── crash.dmp # 崩溃转储文件
使用PowerShell查看: Get-Content -Tail 50 main.log
macOS/Linux日志位置
~/.config/antigravity/logs/ ├── main.log ├── renderer.log ├── extension.log ├── ai-service.log └── performance.log # 性能监控日志
使用命令查看: tail -f main.log
日志级别说明
常见错误模式识别
通过分析日志中的错误模式,可以快速识别问题类别并采取相应的解决措施。
API连接错误
ERROR: [ai-service] Connection timeout to api.gemini.google.com ERROR: [ai-service] HTTP 429: Rate limit exceeded ERROR: [ai-service] HTTP 401: Invalid API key
解决方法:检查网络连接,验证API密钥,调整请求频率或切换模型。
内存不足错误
WARN: [main] High memory usage detected: 95% of 16GB ERROR: [renderer] Out of memory while indexing large project ERROR: [extension] Failed to load extension due to memory constraints
解决方法:减少上下文窗口,禁用选择性索引,关闭不必要的扩展。
文件系统错误
ERROR: [main] Permission denied accessing /path/to/project ERROR: [file-watcher] Too many open files (EMFILE) WARN: [sync] File sync conflict detected: file.js
解决方法:检查文件权限,增加文件描述符限制,解决文件冲突。
扩展和插件故障排除
第三方扩展是功能强大的补充,但也可能成为系统不稳定的源头。 了解如何诊断和管理扩展相关的问题对维护系统稳定性至关重要。
扩展隔离测试流程
当系统出现异常行为时,首先需要确定是否由扩展引起。 通过系统化的隔离测试可以快速定位问题扩展。
步骤1:安全模式启动
使用安全模式启动Antigravity,这会禁用所有第三方扩展,只保留核心功能。
# Windows antigravity.exe --safe-mode # macOS /Applications/Antigravity.app/Contents/MacOS/Antigravity --safe-mode # Linux antigravity --safe-mode
如果问题在安全模式下消失,确认问题由扩展引起。继续下一步定位具体扩展。
步骤2:二分法扩展排查
使用二分法逐步缩小问题范围,快速定位有问题的扩展。
- 禁用一半的扩展,重启测试问题是否复现
- 如果问题消失,在已禁用的扩展中继续二分查找
- 如果问题仍存在,在仍启用的扩展中继续查找
- 重复此过程直到找到具体的问题扩展
步骤3:扩展兼容性检查
即使找到问题扩展,也要检查是否是版本兼容性问题或配置问题。
检查扩展是否支持当前Antigravity版本。 查看扩展页面的兼容性说明。
某些扩展可能有配置冲突。 尝试重置扩展配置到默认值。
检查扩展的依赖是否完整安装, 包括需要的系统组件和其他扩展。
系统恢复和备份策略
建立完善的备份和恢复机制可以在系统出现严重问题时快速恢复到可用状态, 避免丢失重要的配置和数据。这对于生产环境和重要项目尤为关键。
配置文件备份
定期备份Antigravity的配置文件,包括用户设置、扩展配置、快捷键定义和工作空间设置。
手动备份脚本
# Windows PowerShell $backupPath = "C:\Backup\Antigravity\$(Get-Date -Format 'yyyy-MM-dd')" New-Item -ItemType Directory -Path $backupPath -Force Copy-Item "$env:APPDATA\Antigravity\*" $backupPath -Recurse # macOS/Linux Bash backup_dir="$HOME/backup/antigravity/$(date +%Y-%m-%d)" mkdir -p "$backup_dir" cp -r ~/.config/antigravity/* "$backup_dir/"
建议每次重大配置更改前执行备份,或设置定期自动备份任务。
版本控制集成
将重要配置文件纳入Git版本控制,便于跟踪变更和团队共享。
# 创建配置仓库 git init antigravity-config cd antigravity-config # 添加配置文件(排除敏感信息) cp ~/.config/antigravity/settings.json . cp ~/.config/antigravity/keybindings.json . # 不包含包含API密钥的文件 git add . git commit -m "Initial Antigravity configuration"
灾难恢复流程
当系统完全无法启动或配置严重损坏时,按照标准流程进行恢复。
紧急恢复步骤
- 完全卸载: 使用官方卸载工具清除所有文件和注册表项
- 清理残留: 手动删除配置文件夹和缓存目录
- 重新安装: 下载最新版本进行全新安装
- 恢复配置: 从备份中恢复经过验证的配置文件
- 逐步验证: 分步骤恢复扩展和自定义设置
恢复验证清单
Gemini 3 API Quota Exceeded
How to fix 'Model Overloaded' errors in Antigravity during peak hours using retry strategies.
Agent 'Forgets' Instructions or Hallucinates Libraries
Prevent Antigravity from reading large lockfiles and losing context of your actual code.
Agent Imports Non-Existent Packages
Why Gemini keeps importing libraries that don't exist and how to stop it.
Keybindings Conflict with OS
Resolve conflicts between VS Code Python extension and Antigravity's internal language server.
Docker Container Attach Failed
Recover from file corruption when the Agent writes to a file you are editing.
Reducing High API Costs for Logic Agents
Your bill is exploding? Here is how to use Gemini 1.5 Flash and Context Caching to save 90%.
SSH Remote Development Connection Drop
Fix constant reconnections when using Antigravity with Remote-SSH plugin.
WSL2 Connection Timeout / DNS Issues
Fix constant network timeouts when running `npm install` inside WSL2.
Git LFS Bandwidth Limit Exceeded
Cannot push/pull large assets due to GitHub LFS quota limits.
ESLint and Prettier Fighting
Code formats on save, then red squiggles appear immediately.
High CPU Usage (Indexers)
npm install fails because nested node_modules paths exceed 260 characters.
Git Auth Failed (Private Repo)
Fix 'Installation Aborted' or stuck progress bars during Antigravity setup.
Artifact Preview Blank Screen
Fix typing latency and UI lag on older machines.
How to Fix Google Account Authentication Loop
Stuck in a 'Sign In' loop? Here is how to break out.
Terminal Font Rendering Issue
Fix the integrated terminal showing a blank screen or ignoring input.
Agent Stuck on 'Thinking'
Agent says 'Connection Error' or fails to reply.
Extension Host Crash on Startup
Stable diffusion of the IDE due to bad plugins.
Preventing Future Issues
🔧 Regular Maintenance
- Update Antigravity weekly for bug fixes and improvements
- Clear cache monthly: Settings → Developer → Clear Cache
- Review and remove unused extensions quarterly
- Monitor disk space - keep at least 10GB free
⚙️ Optimal Configuration
- Configure API rate limits based on your plan
- Set appropriate context window for your RAM
- Enable auto-save to prevent data loss
- Configure backup AI models for fallback
📊 Performance Monitoring
- Enable performance metrics overlay
- Monitor API usage in Settings → Usage
- Track memory consumption for large projects
- Review error logs weekly for patterns