The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
If Karma’s tests finish but ng test or karma start never returns, first find out which process is still alive. A Chrome startup or capture failure, an intentional watch session, a browser that will not terminate, and a Node or CI wrapper that remains open are different problems with different fixes. Start with the last lifecycle event in the log; increasing a timeout is useful only when that event points to a timeout.
Identify where the run stops
“ChromeHeadless is not exiting” can describe several stages. The browser may never have connected to Karma; tests may have completed while Chrome remains alive; Chrome and Karma may have stopped while a Node-side handle or outer CI process keeps the command open; or the runner may be in watch mode by design. These cases can look similar from a stalled terminal, so use the log and process tree rather than the symptom alone.
- Run the exact same command locally and in CI with debug logging enabled, and save the complete output. For direct Karma CLI, try
karma start --log-level debug; if a framework CLI such as Angular’s owns the runner, use its supported logging option and inspect the effective Karma configuration it passes in. - Mark the last event you can confirm: Chrome launched, Karma captured the browser, tests ran, Chrome disconnected or exited, Karma emitted its stop/exit event, and finally the shell or CI job returned.
- Check which process remains in the process tree: Chrome/Chromium, the Karma/Node process, a reporter or build wrapper, or the shell/CI agent. The process that is still alive determines the next branch.
A 2022 Karma issue describing an Angular and GitLab CI/Kubernetes hang is a useful illustration: its log already showed browser termination, report writing, Karma’s stop event, and proxy cleanup. That does not establish a general Angular or GitLab defect; it shows why a process can appear stuck after the browser has gone.
Make sure Karma is meant to exit
Karma’s one-shot mode is singleRun. In this mode, Karma starts and captures the configured browsers, runs tests, then exits with status 0 if they pass or 1 if they fail. Watch mode, by contrast, intentionally keeps the runner available for subsequent changes. Check the actual command, framework wrapper, and merged configuration: a setting in a base config may be overridden by a CLI or framework-generated config.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Set one-shot mode in configuration
For a direct Karma setup, set the option in karma.conf.js:
module.exports = function (config) {
config.set({
singleRun: true,
browsers: ['ChromeHeadless'],
// Keep the rest of your existing configuration here.
});
};
Set one-shot mode on the CLI
For direct Karma CLI, use --single-run:
karma start --single-run --browsers ChromeHeadless
The Chrome for Developers article’s command is a historical example of this configuration model, not a guarantee that every current framework wrapper accepts the same flags. Its setup was last updated on 2017-06-13. For an Angular or other framework command, verify the version-specific CLI documentation and generated configuration rather than assuming a flag is forwarded to Karma. Karma 6.4 defines singleRun as running the configured browsers and tests before exiting with a pass/fail status.
If ChromeHeadless never connects or captures
A browser capture problem occurs before tests complete. The log may show Chrome launching but not connecting, or a message that ChromeHeadless has not captured. In that case, investigate executable discovery and the startup/transport path rather than browser shutdown.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- Confirm the executable in the failing environment. Check the installed Chrome or Chromium path and version, and whether the CI container can execute it. The karma-chrome-launcher README documents the
CHROME_BINenvironment variable and launcher variants including ChromeHeadless and ChromiumHeadless. - Use a known executable path when needed. The launcher README describes Puppeteer’s executable path as one way to supply Chromium. Confirm that the installed launcher version supports the configuration you use.
- Inspect Chrome stderr and the launch flags. A custom launcher can supply flags, but a flag is not a remedy for an unexplained post-test hang. Compare the actual invocation in local and CI logs.
- Adjust timeouts only when startup evidence warrants it. Karma 3.0 documents a 60,000 ms browser capture timeout and a 30,000 ms browser no-activity timeout. Karma 6.4 documents a 20,000 ms browser socket timeout. These are version-specific documentation values, not universal defaults for every installed dependency combination.
Karma’s capture timeout concerns a browser starting and connecting; it is not a general “make the whole job exit” setting. Karma 3.0 documentation describes retrying capture before giving up. Check the documentation matching your installed Karma version and the runtime effective config before changing values.
If tests completed but Chrome has not terminated
Once the browser has captured and tests have run, look for explicit launcher process-exit or browser-disconnect evidence. If Chrome itself remains in the process tree, inspect its stderr, launcher setup, and environment. Karma’s processKillTimeout is the browser-process escalation wait: Karma 3.0 and 6.4 documentation list a 2,000 ms default before sending SIGKILL when a browser has not terminated after a test run or kill attempt. The installed version’s configuration reference is authoritative for its behavior.
This option addresses the browser termination path. It does not promise that Node, a reporter, a build tool, or a CI shell will close. Raising it can make Karma wait longer; it is not a universal fix for a command that remains alive after Chrome and Karma have already stopped.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
If Chrome and Karma stopped but the command remains open
When the log confirms browser exit and Karma’s stop event, but the shell does not return, investigate the remaining Node process and its parent rather than continuing to tune Chrome flags. The following are possibilities to test against the process tree and logs, not causes established by the historical issue:
- Open file watchers or other active Node handles.
- Reporter or coverage output that has not finished writing or closing.
- A build tool, framework CLI, test orchestrator, or wrapper that remains active after Karma’s own stop event.
- A CI shell, container, or agent process that does not return after the child command exits.
Temporarily isolate reporters, coverage, and project orchestration one at a time while keeping a passing command as a baseline. If removing one component changes the final log event or releases the process, investigate that component’s shutdown behavior. Avoid adding process-exit calls as a first response: they can mask unfinished reporting or other cleanup and can discard useful exit status.
Why does it happen only in CI?
A CI-only symptom indicates an environment difference to compare; it is not, on its own, a diagnosis. In the 2022 issue report, the author described a GitLab CI Kubernetes hang after an Angular 12-to-14 upgrade while local machines returned normally. The report does not establish a confirmed cause or a universal resolution.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Compare the exact versions and runtime conditions on both sides:
- Node.js, Karma,
karma-chrome-launcher, Chrome/Chromium, and the framework CLI. - The resolved Karma configuration, command-line arguments, and environment variables such as
CHROME_BIN. - Whether both runs use the same browser launcher, flags, reporters, coverage, and build/test orchestration.
- Container or VM constraints, process limits, and the CI wrapper’s handling of child-process exit and signals.
Reproduce the CI command locally where feasible, or simplify the CI invocation while retaining the same dependencies. Change one variable at a time and save the before-and-after log. This makes it possible to tell whether the difference occurs at launch, capture, browser shutdown, Karma shutdown, or outside the Karma process.
Choose a fix that matches the stalled stage
| What the log or process tree shows | What to check or change |
|---|---|
| Chrome launches but Karma never captures it | Executable path, Chrome stderr, launcher/version compatibility, and startup/transport. Use capture or socket timeout changes only if the connection is demonstrably slow. |
| Tests keep rerunning or the runner stays ready for changes | Verify effective configuration and CLI mode; enable singleRun: true or the supported one-shot CLI option. |
| Tests finish, but Chrome remains alive | Inspect browser process exit and launcher behavior; check the installed version’s processKillTimeout semantics. |
| Chrome exits and Karma logs stop, but Node remains alive | Inspect active handles, reporters, coverage, build tools, and wrapper processes; isolate them one by one. |
| Local exits but CI does not | Compare versions, effective config, environment, process limits, and CI shell/container behavior. |
Karma configuration defaults and launcher behavior can change between releases. The references here include Karma 3.0 and 6.4 documentation, so do not assume a value or example from one applies unchanged to your installation. Check the package versions actually installed and their matching configuration documentation.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Or skip the browser setup
If your task is to capture a website rather than run Karma tests, ScreenshotNeo is a website screenshot API and MCP server. A single request can return an image or PDF; it does not require you to install and manage a local headless Chrome process. Its clean-shot options accept cookie/consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.
cURL example, saving a WebP screenshot of a target URL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options and response details. An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.
Recommended Free Tools
Frequently Asked Questions
Does “ChromeHeadless have not captured” mean tests are hanging after finishing?
No. It indicates a browser capture/connection problem, which occurs before Karma can run the suite in that browser. Check the launcher, executable, and connection evidence first.
Does processKillTimeout force Karma or the entire CI job to exit?
No. It governs Karma’s browser-process termination escalation path. It does not guarantee that Node-side resources or an outer wrapper or CI process will close.
Can I use ScreenshotNeo to fix a Karma test runner that will not exit?
No. ScreenshotNeo captures web pages; it does not manage Karma’s test-runner lifecycle. Use it when your goal is website screenshots rather than browser-based test execution.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

