Chrome crashed during startup before ChromeDriver could connect to it. It almost always shows up when Chrome runs inside Docker or on a headless Linux CI runner.
Published
Why this happens
Chrome is running as root in a container without `--no-sandbox`
The container's `/dev/shm` is too small (Docker's default is 64MB), so Chrome runs out of shared memory and crashes
No display is available and Chrome wasn't started with `--headless=new`
A leftover Chrome process or a locked `--user-data-dir` from a previous run is blocking startup
How to fix it
Add `--headless=new`, `--no-sandbox`, and `--disable-dev-shm-usage` to ChromeOptions when running in containers
Or give the container more shared memory: `docker run --shm-size=2g ...`
Use a fresh, unique `--user-data-dir` per session (or don't set one at all), and kill stray Chrome processes between runs
Example
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless=new");
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
WebDriver driver = new ChromeDriver(options);