I did it! Struggled for 2 weeks! Found the solution!
Fixing Error 400 (User location is not supported) in Antigravity 1.23.2 (WSL)
Why does this error occur?
If you are getting this message, it means your actual region is not supported by Antigravity (Gemini) services for some reason. To bypass this restriction, a VPN is strictly required. For example, I use a US server (Miami, Florida).
However, if you’ve turned on your VPN and the 400 error still persists, the problem lies in a traffic leak.
The technical core of the issue:
In the 1.23.2 update, requests to the AI models started routing directly. If you are working on Windows via the Windows Subsystem for Linux (WSL), a conflict arises: WSL ignores Windows system proxies by default. As a result, your browser connects through the US, but the hidden agent inside WSL sends traffic directly through your local ISP. The security system detects your real IP and drops the connection.
The Solution: Strict Tunneling (using Happ, v2rayN, NekoBox as examples)
A regular proxy mode is no longer enough. You need to intercept absolutely all system traffic at a low level.
-
Go to your VPN/proxy client settings.
-
Enable TUN Mode.
-
In the routing settings, select the gVisor (or Strict/Global) mode.
Important: “Mixed” or “System” modes will not work — WSL will route traffic past the tunnel again!
-
Enable the DNS for TUN option and set the address to 1.1.1.1 (to prevent location leaks via your ISP’s DNS).
-
Turn the connection off and back on in your app to apply the new settings.
-
Mandatory step: Open PowerShell and enter the following command to force restart the Linux network:
Bash
wsl --shutdown
-
Restart Antigravity — the agent should be working again.
If you use a classic VPN (Outline, Amnezia, etc.):
These inherently work as a tunnel. To avoid issues, simply disable the IPv6 protocol in your Windows network adapter properties, set the IPv4 DNS to 1.1.1.1, and don’t forget to run the wsl --shutdown command.