GoogleChromeLabs / GoogleChromeLabs/chrome-for-testing

headless_shell ignores --remote-debugging-address=0.0.0.0, always binds CDP to 127.0.0.1

Open
#203 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
159
Avg merge
18h 37m
Merged PRs (30d)
3

Description

## Problem

When launching `headless_shell` (Chrome Headless Shell), the `--remote-debugging-address=0.0.0.0` flag is silently ignored. The CDP HTTP server always binds to `127.0.0.1`, regardless of the flag value.

This does **not** happen with the full Chrome/Chromium binary — only with `headless_shell`.

## Steps to reproduce

1. Launch `headless_shell` with `--remote-debugging-port=9222 --remote-debugging-address=0.0.0.0`
2. Check the listening address with `ss -tlnp` or `/proc//net/tcp`
3. CDP is bound to `127.0.0.1:9222` instead of `0.0.0.0:9222`

## Expected behavior

`--remote-debugging-address=0.0.0.0` should bind the CDP server to all interfaces, matching the behavior of the full Chrome binary.

## Environment

- Chrome Headless Shell version: `chromium_headless_shell-1208` (via Playwright 1.50.x)
- OS: Linux (Docker / Debian bookworm-slim)

## Use case

Running headless Chrome inside Docker and connecting DevTools from the host via `chrome://inspect`. Docker forwards `host:9222 → container:9222`, but since `headless_shell` only binds to loopback, the connection is refused.

Ref: https://github.com/microsoft/playwright/issues/39802

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by launching headless_shell with --remote-debugging-port=9222 and --remote-debugging-address=0.0.0.0, then inspect the listening address with ss or /proc//net/tcp. Compare headless_shell's CDP server startup with the full Chrome binary's handling of the address flag; done means the headless shell listens on 0.0.0.0:9222.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.