You are getting an HTTP 400 with “Invalid project resource name projects” because Antigravity is calling the API with an empty project id after switching accounts. The project selection UI is missing, so auto provisioning never wrote a default project and the client falls back to projects with no id.
Fix HTTP 400 Invalid project resource name projects in Antigravity
Users report that Antigravity keeps sending requests to projects with an empty name, returning a 400 error. After switching accounts, the app does not display a project picker and fails to persist a valid project id, even after cleaning local folders and trying antigravity auth login –force-project-sync.
If your error is instead about account eligibility, see our quick checklist here: account not eligible troubleshooting.
Solution Overview
Aspect
Detail
Root Cause
No default Google Cloud project is set after account switch, so requests are sent to projects with an empty id
Primary Fix
Clear local Antigravity state, set a valid project id, then reauthenticate and force a project sync
Complexity
Easy
Estimated Time
10 to 15 minutes
Primary Fix Set a valid Google Cloud project and resync Antigravity
Step-by-Step Solution
1. Identify a valid Google Cloud project id
A valid id is lowercase, contains letters numbers and dashes, and matches what you see in Google Cloud Console Project settings.
If you have the Google Cloud CLI, list projects:
gcloud projects list
Install or update gcloud if needed: https://cloud.google.com/sdk/docs/install
2. Set the project id in your environment
Set this to the exact project id you will use.
Windows PowerShell:
Optionally tell gcloud the same default, which many SDKs read:
gcloud config set project your-project-id
Reference: https://cloud.google.com/sdk/docs/configurations
3. Fully clear Antigravity local state
Quit Antigravity completely first.
Windows PowerShell:
5. Relaunch Antigravity and verify calls include your project id
Open the app and trigger any action that previously failed. The requests should now include projects/your-project-id rather than projects with no id.
If you also hit temporary capacity messages during this step, see this note on timing out and retries: servers under high traffic.
Alternative Fixes and Workarounds
Create a project and attach billing if you do not have one
In Google Cloud Console, create a new project and attach billing, then repeat Steps 2 to 5 with this new project id.
Use gcloud application default credentials if your environment relies on them
gcloud auth application-default login
gcloud config set project your-project-id
Restart Antigravity and try again.
Update Antigravity to the latest build
Older builds may hide the project picker and not retry auto provisioning correctly. Update to the newest version, then repeat Steps 2 to 5.
If your workspace or Stitch content refuses to load
If the app UI still does not surface your project or assets, review this checklist: project not loading in Stitch.
Troubleshooting Tips
Confirm the variable is set correctly
– Windows:
“`
echo %GOOGLE_CLOUD_PROJECT%
“`
– macOS or Linux:
“`
echo $GOOGLE_CLOUD_PROJECT
“`
– The output must exactly match your project id
Verify you have permission on the project
– You need at least viewer and any roles Antigravity requires in that project
– If you switched accounts, ensure the new account has access
Ensure required Google Cloud APIs are enabled for your project
– Open the Cloud Console APIs and Services page and enable the services Antigravity depends on
– Disable and retry to rule out request rewriting that can drop headers
Best Practices
Keep a single primary Google account for Antigravity work to avoid silent context switches.
Pin a default project with GOOGLE_CLOUD_PROJECT and gcloud config set project to make the context explicit.
Do not rely solely on auto provisioning. Always verify the project id after sign in.
Document your team’s project id and permissions so new sign ins are consistent.
If you see a different eligibility message before you can pick a project, this checklist helps you clear account gating quickly: fix account eligibility.
Final Thought
The error disappears as soon as Antigravity has a valid default project to call. Set the project id, clear stale state, then reauthenticate with a forced sync and your requests will resolve to projects with the correct id.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.