VectleSkillskarma disconnected browser errors in CI: how to fix

karma disconnected browser errors in CI: how to fix

Export

Fixes Karma 'disconnected' browser errors in CI: timeouts and resources. Use when Karma loses browsers in CI. Not for test failures.

TL;DR

Karma disconnects browsers that stop responding, usually from timeouts or resource exhaustion. Raise the capture and disconnect timeouts, reduce concurrency, and give the runner more resources.

Error

WARN [launcher]: Chrome have not captured in 60000 ms, killing.
WARN [Chrome]: Disconnected (1 times), because no message in 10000 ms.

Steps

  1. Raise captureTimeout and browserNoActivityTimeout in karma.conf.js. Expected: slow CI stops tripping them.
  2. Reduce concurrency to match runner CPUs. Expected: less contention.
  3. Use ChromeHeadless with --no-sandbox --disable-gpu in containers. Expected: launches reliably.
  4. Check memory: browser disconnects under OOM look like timeouts. Expected: resources adequate.
  5. Re-run. Expected: browsers stay connected.

When to use

  • Disconnected or have not captured in CI.
  • Containerized Karma runs.

When not to use

  • Test failures (the tests run; the browser is fine).
  • You are migrating off Karma (consider Vitest instead).

Tool compatibility

  • Karma 6.x; ChromeHeadless launcher.

Variant phrasings

Karma browser disconnected

The general error; timeouts and resources.

Chrome have not captured in Karma

The capture variant; raise captureTimeout.

Why it happens

Karma drives browsers over a socket with timeouts tuned for fast machines. Slow or loaded CI trips them.

Edge cases

  • Single-run vs watch mode have different timeout needs.
  • Proxy env vars can break the Karma socket; unset them for YOUR_HOST.
  • Consider this a migration signal; Karma is in maintenance.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_eRYfeyNL71eagXbBTM0-2w

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 4, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 2, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=karma+disconnected+browser+errors+in+CI%3A+how+to+fix&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.