On Jenkins server Cypress crashes after starting with error
The Test Runner unexpectedly exited via a exit event with signal SIGILL
locally everything works as expected

Cypress 4.4.0
operating system Ubuntu 16.04
I found that the version of cypress must be the same one which is added to your package.json when you installed it.
So if your package.json says:
"cypress": "^4.2.0",
just remove ^ so you will have
"cypress": "4.2.0",
I tried with lover and higher versions but only this works for me...
That doesn't work for me, I have:
"cypress": "4.8.0",
and still get that same error.
OK, I've been doing some testing, and discovered the following:
Last version where Cypress works with Jenkins is 4.1.0. Any newer version throws this error.
My setup is:
It would be really nice if this issue gets attention and gets fixed.
Stack trace
It looks like this is your first time using Cypress: 4.8.0
[11:41:20] Verifying Cypress can run /root/.cache/Cypress/4.8.0/Cypress [started]
[11:41:22] Verifying Cypress can run /root/.cache/Cypress/4.8.0/Cypress [completed]
Opening Cypress...
================================================================================
(Run Starting)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Cypress: 4.8.0 โ
โ Browser: Electron 80 (headless) โ
โ Specs: 1 found (demo/index.spec.ts) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Running: demo/index.spec.ts (1 of 1)
Error: The Test Runner unexpectedly exited via a exit event with signal SIGILL
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 4.8.0
at /app/node_modules/cypress/lib/errors.js:326:15
at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/app/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/app/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/app/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/app/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:e2e:desktop: `NODE_TEST=e2e NODE_HTTPS=true TS_NODE_FILES=true node -r ts-node/register cypress-launcher.ts --desktop`
npm ERR! Exit status 1
Also seeing this on versions 4.7, 4.8 & 4.9 when running on Jenkins
i've tried 4.2.0 and 4.10.0. both gets this error.
I wonder if
21:25:03 resize: can't open terminal /dev/tty
21:25:03 tput: No value for $TERM and no -T specified
has anything to do with it.
21:24:58 It looks like this is your first time using Cypress: 4.2.0
21:24:58
21:24:58 [04:24:58] Verifying Cypress can run /var/lib/jenkins/.cache/Cypress/4.2.0/Cypress [started]
21:24:59 [04:24:59] Verifying Cypress can run /var/lib/jenkins/.cache/Cypress/4.2.0/Cypress [completed]
21:24:59
21:24:59 Opening Cypress...
21:25:03
21:25:03 resize: can't open terminal /dev/tty
21:25:03 tput: No value for $TERM and no -T specified
21:25:03 ================================================================================
21:25:03
21:25:03 (Run Starting)
21:25:03
21:25:03 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
21:25:03 โ Cypress: 4.2.0 โ
21:25:03 โ Browser: Electron 80 (headless) โ
21:25:03 โ Specs: 1 found (homePageSpec.ts) โ
21:25:03 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
21:25:03
21:25:03
21:25:03 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
21:25:03
21:25:03 Running: homePageSpec.ts (1 of 1)
21:25:03 The Test Runner unexpectedly exited via a exit event with signal SIGILL
21:25:03
21:25:03 Please search Cypress documentation for possible solutions:
21:25:03
21:25:03 https://on.cypress.io
21:25:03
21:25:03 Check if there is a GitHub issue describing this crash:
21:25:03
21:25:03 https://github.com/cypress-io/cypress/issues
21:25:03
21:25:03 Consider opening a new issue.
21:25:03
21:25:03 ----------
21:25:03
21:25:03 Platform: linux (Ubuntu Linux - 16.04)
21:25:03 Cypress Version: 4.2.0
Can anyone else verify if this issue is fixed when rolling back to 4.1.0? Isolating to a specific version would be helpful.
Could you run Cypress in debug mode mode and print the entire set of logs here also?
I also see that everyone is using Electron headless browser. Has anyone tried running on a Chrome browser, passing the --browser flag?
Dont start Xvfb like this: https://docs.cypress.io/guides/guides/continuous-integration.html#Xvfb
Start it like this: Xvfb -screen 0 1024x768x24 :99 &
Because this: https://github.com/microsoft/vscode/issues/95415
More specifically this: https://github.com/microsoft/vscode/issues/95415#issuecomment-617994685
Hope this helps someone else.
I also see that everyone is using Electron headless browser. Has anyone tried running on a Chrome browser, passing the
--browserflag?
I have tried. Same result.
@jennifer-shehane can confirm rollback to 4.1.0 resolved this for us using Chrome on GitLab CI.
Confirming this issue on Cypress 5.0, using Electron browser and bundled Node.
CI env is CentOS 8 with externally started xvfb server (started via /usr/bin/Xvfb :99 -screen 0 1920x1080x24+32 &)
I am NOT able to reproduce with Chrome 85 headless.
Confirming this issue, or at least something very similar, on Cypress 5.2.0
TypeError: Cannot read property 'length' of undefined
at isInvalidSuite (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/node_modules/mocha-junit-reporter/index.js:130:62)
at MochaJUnitReporter.<anonymous> (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/node_modules/mocha-junit-reporter/index.js:202:10)
at Runner.emit (events.js:228:7)
at Reporter.emit (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/lib/reporter.js:322:46)
at Object.onMocha (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/lib/project.js:360:18)
at Socket.<anonymous> (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/lib/socket.js:320:32)
at Socket.emit (events.js:223:5)
at /home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/socket/node_modules/socket.io/lib/socket.js:528:12
at processTicksAndRejections (internal/process/task_queues.js:76:11)
TypeError: Cannot read property 'length' of undefined
at isInvalidSuite (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/node_modules/mocha-junit-reporter/index.js:130:62)
at MochaJUnitReporter.<anonymous> (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/node_modules/mocha-junit-reporter/index.js:202:10)
at Runner.emit (events.js:228:7)
at Reporter.emit (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/lib/reporter.js:322:46)
at Object.onMocha (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/lib/project.js:360:18)
at Socket.<anonymous> (/home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/server/lib/socket.js:320:32)
at Socket.emit (events.js:223:5)
at /home/LETO/dk7239/.cache/Cypress/5.2.0/Cypress/resources/app/packages/socket/node_modules/socket.io/lib/socket.js:528:12
at processTicksAndRejections (internal/process/task_queues.js:76:11)
The Test Runner unexpectedly exited via a exit event with signal SIGILL
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Platform: linux (Ubuntu - 18.04)
Cypress Version: 5.2.0
Update: I just discovered that I had a context inside an it, which is clearly wrong, but I guess the error handling for this situation is not working properly.
Most helpful comment
OK, I've been doing some testing, and discovered the following:
Last version where Cypress works with Jenkins is 4.1.0. Any newer version throws this error.
My setup is:
It would be really nice if this issue gets attention and gets fixed.
Stack trace