title: npm test with ChromeHeadlessCustom ends in ERR! code ELIFECYCLE
body: <p>According to this new way to use Angular with GitHub Actions (<a href="https://coryrylan.com/blog/building-angular-cli-projects-with-github-actions" rel="nofollow noreferrer">https://coryrylan.com/blog/building-angular-cli-projects-with-github-actions</a>) I tried to do the same steps like the manual.</p>
  
  <p>But I'm ending with an error that is very useless for me because I don't understand it. I've googled much but that didn't help.</p>
  
  <p>The error just occurs when I run the command <code>ng test --watch=false --browsers=ChromeHeadlessCustom</code></p>
  
  <p>The error log looks like this</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [
  1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
  1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
  1 verbose cli   'run',
  1 verbose cli   'test'
  1 verbose cli ]
  2 info using npm@6.12.0
  3 info using node@v12.13.0
  4 verbose run-script [ 'pretest', 'test', 'posttest' ]
  5 info lifecycle project@0.0.0~pretest: project@0.0.0
  6 info lifecycle project@0.0.0~test: project@0.0.0
  7 verbose lifecycle project@0.0.0~test: unsafe-perm in lifecycle true
  8 verbose lifecycle project@0.0.0~test: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\user\Git\project\projectAngularFolder\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Gradle\gradle-5.3\bin;C:\Program Files\Dart\dart-sdk\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\user\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Roaming\npm
  9 verbose lifecycle project@0.0.0~test: CWD: C:\Users\user\Git\project\projectAngularFolder
  10 silly lifecycle project@0.0.0~test: Args: [ '/d /s /c', 'ng test --watch=false --browsers=ChromeHeadlessCustom' ]
  11 silly lifecycle project@0.0.0~test: Returned: code: 1  signal: null
  12 info lifecycle project@0.0.0~test: Failed to exec test script
  13 verbose stack Error: project@0.0.0 test: `ng test --watch=false --browsers=ChromeHeadlessCustom`
  13 verbose stack Exit status 1
  13 verbose stack     at EventEmitter.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
  13 verbose stack     at EventEmitter.emit (events.js:210:5)
  13 verbose stack     at ChildProcess.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
  13 verbose stack     at ChildProcess.emit (events.js:210:5)
  13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
  13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
  14 verbose pkgid project@0.0.0
  15 verbose cwd C:\Users\user\Git\project\projectAngularFolder
  16 verbose Windows_NT 10.0.17763
  17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
  18 verbose node v12.13.0
  19 verbose npm  v6.12.0
  20 error code ELIFECYCLE
  21 error errno 1
  22 error project@0.0.0 test: `ng test --watch=false --browsers=ChromeHeadlessCustom`
  22 error Exit status 1
  23 error Failed at the project@0.0.0 test script.
  23 error This is probably not a problem with npm. There is likely additional logging output above.
  24 verbose exit [ 1, true ]
  </code></pre>
  
  <p>And the terminal output looks like this</p>
  
  <pre><code>10% building 2/2 modules 0 active21 11 2019 13:03:27.328:INFO [karma-server]: Karma v4.0.1 server started at http://0.0.0.0:9876/
  21 11 2019 13:03:27.338:INFO [launcher]: Launching browsers ChromeHeadlessCustom with concurrency unlimited
  21 11 2019 13:03:27.348:INFO [launcher]: Starting browser ChromeHeadless
  21 11 2019 13:03:33.161:INFO [HeadlessChrome 78.0.3904 (Windows 10.0.0)]: Connected on socket J0L-zTEyuknEqrjrAAAA with id 25147898
  21 11 2019 13:04:05.152:WARN [HeadlessChrome 78.0.3904 (Windows 10.0.0)]: Disconnected (0 times)reconnect failed before timeout of 2000ms (ping timeout)
  HeadlessChrome 78.0.3904 (Windows 10.0.0) ERROR
    Disconnectedreconnect failed before timeout of 2000ms (ping timeout)
  
  HeadlessChrome 78.0.3904 (Windows 10.0.0) ERROR
    Disconnectedreconnect failed before timeout of 2000ms (ping timeout)
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! project@0.0.0 test: `ng test --watch=false --browsers=ChromeHeadlessCustom`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the project@0.0.0 test script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-11-21T12_04_18_091Z-debug.log
  </code></pre>