Open Browser (Preview) button do not working on Antigravity using a devcontainer

The Antigravity button in the devcontainer mode is not working, everything works fine using in normal mode.

{
  "name": "name-base",
  "dockerComposeFile": "docker-compose.yml",
  "service": "app",
  "workspaceFolder": "/workspaces/name-base",
  "remoteUser": "vscode",
  "remoteEnv": {
    "PYTHONPATH": "/workspaces/name-base"
  },
  "postCreateCommand": "python3 -m pip install --upgrade pip build setuptools wheel"
}
services:
  app:
    build:
      context: ..
      dockerfile: .devcontainer/Dockerfile
    volumes:
      - ..:/workspaces/name-base:cached
    command: sleep infinity
    env_file:
      - ../.env
    ports:
      - "8001:8001"
      - "4200:4200"
    depends_on:
      db:
        condition: service_healthy

  db:
    image: postgres:16-alpine
    restart: unless-stopped
    volumes:
      - postgres-data:/var/lib/postgresql/data
    env_file:
      - ../.env
    ports:
      - "5432:5432"
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready -U ${POSTGRES_USER:-name_base_user} -d ${POSTGRES_DB:-name_base_db}
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  postgres-data:


+1. Also have not been able to launch Antigravity browser from devcontainers.

In my case, the button works, but then the agent is not able to connect to the browser, as if the extension was not installed. Is there an update on this?

Same to me. The launcher button does nothing and when the agent tries to launch it, it just fails.

Same here. Antigravity can no longer open Google Chrome on its own and the button has stopped working. I have reinstalled and deleted all user folders in case it was a user configuration issue, but it still does not work.

Here is the video on how I have fixed the issue: https://youtu.be/V9SoulRerXc

Hi everyone,

Thanks to @Pritam_Das for sharing the fix! You can see the full walkthrough in Pritam’s video here

Is anyone else still facing this issue after applying the fix? If you’re still stuck, please reply with your OS and any error logs from your Antigravity Output tab so we can take a closer look.

I found another way to fix it, at least on macOS, that is using a socat connection inside the container to read from host 9222 port (Antigravity’s Chrome)
socat TCP-LISTEN:9222,fork,reuseaddr TCP:host.docker.internal:9222

I also wrote a full post on how to get a good devcontainer configuration to make it easier for newcomers: