stryker-mutator / stryker-js

Mutation testing for JavaScript and friends
https://stryker-mutator.io
Apache License 2.0
2.61k stars 250 forks source link

ChildProcessCrashedError for Angular project #4685

Open alexvaidya opened 11 months ago

alexvaidya commented 11 months ago

Question

I am trying to configure Stryker for Angular UI project. Stryker is running fine locally. But, when trying to run from circleci pipeline, we are getting error: "ChildProcessCrashedError: Child process [pid 2688] exited unexpectedly with exit code null (SIGKILL). Last part of stdout and stderr was:" Does anyone has any idea how to resolve this issue?

Stryker environment

+-- @stryker-mutator/core@8.0.0
+-- @stryker-mutator/xxx-xxx@x.x.x

+-- karma@6.3.0 +-- angular-cli@13.3.0

Additional context

Here is a log message from circleci:

05 01 2024 19:35:49.652:WARN [karma-server]: autowatch and singleRun are both false. In order to execute tests use karma run. ChildProcessCrashedError: Child process [pid 2688] exited unexpectedly with exit code null (SIGKILL). Last part of stdout and stderr was: 05 01 2024 19:35:49.652:WARN [karma-server]: autowatch and singleRun are both false. In order to execute tests use karma run.

at ChildProcess.handleUnexpectedExit (file:///home/circleci/project/node_modules/@stryker-mutator/core/dist/src/child-proxy/child-process-proxy.js:179:31)
at ChildProcess.emit (node:events:537:28)
at ChildProcess.emit (node:domain:482:12)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5) {

innerError: undefined, pid: 2688, exitCode: null, signal: 'SIGKILL' } 19:37:04 (1420) ERROR Stryker Unexpected error occurred while running Stryker ChildProcessCrashedError: Child process [pid 2688] exited unexpectedly with exit code null (SIGKILL). Last part of stdout and stderr was: 05 01 2024 19:35:49.652:WARN [karma-server]: autowatch and singleRun are both false. In order to execute tests use karma run.

at ChildProcess.handleUnexpectedExit (file:///home/circleci/project/node_modules/@stryker-mutator/core/dist/src/child-proxy/child-process-proxy.js:179:31)
at ChildProcess.emit (node:events:537:28)
at ChildProcess.emit (node:domain:482:12)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5) {

innerError: undefined, pid: 2688, exitCode: null, signal: 'SIGKILL' } 19:37:04 (1420) INFO Stryker This might be a known problem with a solution documented in our troubleshooting guide. 19:37:04 (1420) INFO Stryker You can find it at https://stryker-mutator.io/docs/stryker-js/troubleshooting/ 19:37:04 (1420) INFO Stryker Still having trouble figuring out what went wrong? Try npx stryker run --fileLogLevel trace --logLevel debug to get some more info.

Exited with code exit status 1 CircleCI received exit code 1

Luis-H-Baroni commented 6 months ago

I don't know if this helps, but adding the propertie "concurrency": 2 in our stryker.conf.json solved the ChildProcessCrashedError in my case.