-1

I'm encountering a recurring issue while running tests in my Angular project using Karma. The problem occurs specifically when trying to run tests in Chrome Headless mode. The error message I observe in the console is:

enter image description here

enter image description here

Chrome Headless 115.0.5790.171 (Windows 10) ERROR Disconnected Client disconnected from CONNECTED state (ping timeout)

This error consistently occurs, and despite my attempts to resolve it, including adjusting memory settings and investigating network/firewall configurations, the problem persists.

Key Observations:

The Karma server connects to Chrome Headless but disconnects with a "ping timeout" error.
Restarting Chrome Headless does not prevent the crash.
I've verified that the test file paths are correct and aligned with the specified pattern.
My dependencies, including Angular CLI, Karma, and other packages, are up-to-date.

Is anyone familiar with this issue and its potential solutions? I'd appreciate guidance on troubleshooting steps to resolve this problem. Are there specific settings or configurations I should consider when using Chrome Headless for tests on Windows 10?

Additional Information:

Angular CLI version: [Your Angular CLI version]
Karma version: [Your Karma version]
Operating system: Windows 10 [Your OS version]
Relevant dependencies and versions:
    @angular-devkit/architect: 0.1402.12
    @angular/cli: 14.2.12
    karma: 6.4.1
DEV
  • 1,607
  • 6
  • 19

0 Answers0