Critical Bug: Persistent HTTP 400 "Invalid project resource name projects/" even after Gmail switch

Yes, it started working after I deleted Gmail from Google Services and left my regular email address. In fact, it continued working even after I added Gmail back using mail.google.com. I logged out of Antigravity and logged back in with my Gmail, and it’s still working.

I deleted my Gmail account but didn’t log out:

I re-added my Gmail account and logged into Antigravity again from scratch:

Although I’m not entirely sure:

The Error Log:

JSON

Error: HTTP 400 Bad Request

{
  "error": {
    "code": 400,
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "description": "Invalid project resource name",
            "field": "name"
          }
        ]
      }
    ],
    "message": "Invalid project resource name projects/",
    "status": "INVALID_ARGUMENT"
  }
}

My Theory / Root Cause (For Devs):

Based on the Invalid project resource name projects/ error (notice the missing project ID after the slash), it seems Antigravity fails to fetch the project ID when the primary alias of a Google Account changes. Here is the step-by-step breakdown of how the bug triggers:

  1. A user signs up/authorizes Antigravity using a non-Gmail Google account (e.g., an Outlook/Hotmail address). A project is created and linked to this identity in the background.

  2. The user later adds the “Gmail” service to their existing Google account, which automatically makes the new @gmail.com address their primary alias.

  3. When the user tries to log into Antigravity using this new Gmail alias, the system fails to map it to the originally created project. The API sends an empty project ID (projects/), which triggers the HTTP 400 fieldViolations error.

The Workaround / Fix:

  1. Go to your Google Account settings and temporarily delete the Gmail service (WARNING: This deletes your inbox, so only do this if you don’t have important emails).

  2. Log into Antigravity using your original non-Gmail email. It will work flawlessly.

  3. Re-add the Gmail service to your Google Account via mail.google.com.

  4. Log out of Antigravity and log back in with your Gmail. The tokens sync correctly, and the IDE continues to work without any issues!

Hope this helps anyone stuck with the same error!

2 Likes