Skip to content

ltntai/google-cloudcode-hosts-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ Google Cloud Code Hosts Fix ✨

🛠️ Fix Antigravity / Google Cloud Code sign-in error on Windows

Windows Google Cloud Code Antigravity Batch License

Windows .bat tool to fix There was an unexpected issue setting up your account by cleaning broken Google Cloud Code hosts entries and flushing DNS.


🚀 What is this?

Google Cloud Code Hosts Fix is a small Windows batch script for fixing Antigravity sign-in, Google Cloud Code account setup, and 9Router routing issues caused by stale or incorrect local hosts entries.

It is especially useful for cases where Antigravity shows this error while being routed through tools such as 9Router:

There was an unexpected issue setting up your account

🎯 What does it fix?

The script removes any line in the Windows hosts file that contains:

cloudcode-pa.googleapis.com

If this domain is blocked or mapped to a wrong IP, Google Cloud Code / Antigravity may fail during account setup. This can happen after local routing, proxy, or MITM-style debugging setups leave a stale hosts entry behind.


✨ Features

  • 🛡️ Automatically requests Administrator permission
  • 🧹 Removes broken cloudcode-pa.googleapis.com hosts entries
  • ⚡ Flushes Windows DNS cache
  • ✅ Checks whether the fix was applied successfully
  • 🔒 No API keys, tokens, accounts, or private data required
  • 🌈 Colorful console output for easier reading

🔎 Search keywords

This project may help if you are searching for:

  • Antigravity there was an unexpected issue setting up your account
  • Google Cloud Code sign in error Windows
  • Google Cloud Code account setup error
  • cloudcode-pa.googleapis.com hosts file fix
  • 9Router Antigravity setup issue
  • Windows hosts file DNS fix for Google Cloud Code

📦 Download

Download the script from this repository:

fix-google-cloudcode.bat

Or clone the repo:

git clone https://github.com/ltntai/google-cloudcode-hosts-fix.git

🧭 Usage

1. Manual Execution

  1. Download fix-google-cloudcode.bat.
  2. Right-click the file.
  3. Choose Run as administrator.
  4. Wait for the script to finish.
  5. Restart Google Cloud Code / Antigravity if needed.

2. Run Automatically on VS Code Startup

We have pre-configured a VS Code task in .vscode/tasks.json. When you open this folder in VS Code:

  • VS Code will prompt you to allow automatic tasks for this folder.
  • Once allowed, the script will automatically run in the background (using the /silent flag) whenever the workspace is loaded.
  • Note: Since the script modifies system files, Windows will still display a UAC prompt asking for permission.

3. Run Automatically on Windows Logon (Recommended, Silent & Hidden)

To avoid UAC prompts every time you open VS Code, you can register it as a Windows scheduled task:

  1. Right-click setup-autorun.bat.
  2. Choose Run as administrator.
  3. Press 1 to Enable Auto Run and press Enter.
  4. The script will now run completely hidden in the background every time you log in to Windows, ensuring the hosts file is clean without any prompt.
  5. If you ever want to remove it, run setup-autorun.bat again and press 2 to Disable Auto Run.

🧩 What does the script do?

Step Action
1 Requests Administrator permission
2 Opens C:\Windows\System32\drivers\etc\hosts
3 Removes entries containing cloudcode-pa.googleapis.com
4 Runs ipconfig /flushdns
5 Verifies that the hosts entry is gone

🔐 Is this tied to my IP, API key, or account?

No.

This script does not use:

  • ❌ API keys
  • ❌ tokens
  • ❌ Google account data
  • ❌ IP-specific configuration
  • ❌ project IDs
  • ❌ private credentials

It only modifies your local Windows hosts file.


🪟 Requirements

  • Windows
  • Administrator permission

🛡️ Safety note

This script only removes entries containing:

cloudcode-pa.googleapis.com

from the local hosts file.

It does not install software, download files, or send data anywhere.


⚠️ Disclaimer

Use at your own risk. This tool is provided as-is for fixing local DNS / hosts configuration issues.


Made with 💙 by Tấn Tài

About

Fix Antigravity / Google Cloud Code sign-in setup error on Windows by removing broken hosts entries and flushing DNS.

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors