Karma "There is no captured browser, open http://localhost:9876/" in CI
Karma starts a server on port 9876 and waits for a browser to load that URL and be captured. With no headless flags on a display-less runner, no browser connects, so Karma reports "There is no captured browser".
What this error means
Karma logs "WARN [karma]: No captured browser, open http://localhost:9876/" repeatedly and the run fails without executing any spec.
karma
30 06 2026 12:00:00.000:WARN [karma]: No captured browser, open http://localhost:9876/
30 06 2026 12:00:00.000:INFO [Chrome]: Trying to start Chrome ...
30 06 2026 12:00:30.000:WARN [launcher]: Chrome have not captured in 60000 ms, killing.Common causes
A headed browser on a runner with no display
The Chrome launcher tries to open a window where there is no display, so the browser never loads the capture URL.
Sandbox crash prevents capture
Headless Chrome in a root container without --no-sandbox crashes before it can connect to Karma.
How to fix it
Use a headless launcher with container flags
- Define a custom launcher extending ChromeHeadless with --no-sandbox.
- Set browsers to that launcher in CI.
- Re-run so the browser captures.
karma.conf.js
// karma.conf.js
customLaunchers: {
ChromeHeadlessCI: { base: 'ChromeHeadless', flags: ['--no-sandbox', '--disable-dev-shm-usage'] },
},
browsers: ['ChromeHeadlessCI'],Run Karma once and exit
Use single-run mode so CI does not hang waiting for an interactive browser to attach.
Terminal
npx karma start --single-run --browsers ChromeHeadlessCIHow to prevent it
- Use a ChromeHeadless launcher with --no-sandbox in CI.
- Run Karma in single-run mode so it does not wait for a manual browser.
- Avoid headed launchers on display-less runners.
Related guides
Karma "Chrome have not captured in 60000 ms, killing" in CIFix Karma "Chrome have not captured in 60000 ms, killing" in CI - the browser launched but did not connect to…
Selenium "WebDriverException: unknown error: Chrome failed to start: crashed" in CIFix Selenium "unknown error: Chrome failed to start: crashed (chrome not reachable)" in CI - headless Chrome…
TestCafe "Unable to establish ... browser connection" in CIFix TestCafe "Unable to establish one or more of the specified browser connections" in CI - the launched brow…