Skip to content

fix(ci): increase karma capture timeout to avoid flaky Chrome launches#544

Merged
phil-davis merged 1 commit into
masterfrom
fix/ci-chrome-capture-timeout
Jul 9, 2026
Merged

fix(ci): increase karma capture timeout to avoid flaky Chrome launches#544
phil-davis merged 1 commit into
masterfrom
fix/ci-chrome-capture-timeout

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Problem

The JS Unit CI job failed on master (run 29004103213) for a translation-only commit (#534) that touches no JavaScript.

The logs show the tests never ran — ChromeHeadless failed to launch within the configured timeout:

ChromeHeadless has not captured in 5000 ms, killing.
ChromeHeadless failed 2 times (timeout). Giving up.

Re-running the identical job with no code changes passed, confirming a flaky, environmental launch timeout rather than a code regression.

Root cause

js/karma.conf.js set captureTimeout: 5000 (unchanged since 2014). 5 seconds is too tight for a cold GitHub Actions runner to download and spawn headless Chrome — Karma's default is 60000ms.

Fix

  • Raise captureTimeout from 500060000 (Karma default).
  • Add browserDisconnectTolerance: 2 to ride out transient launch hiccups.

No test logic is changed. This only affects how long CI waits for the browser to come up.

🤖 Generated with Claude Code

ChromeHeadless intermittently failed to capture within the previous 5s
timeout on cold CI runners, causing spurious JS Unit failures on master
even for commits touching no JS (e.g. translation-only changes).

Raise captureTimeout to 60s (Karma's default) and tolerate a couple of
transient browser disconnects so a slow launch no longer fails the job.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@phil-davis phil-davis merged commit c392619 into master Jul 9, 2026
11 checks passed
@phil-davis phil-davis deleted the fix/ci-chrome-capture-timeout branch July 9, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants