cypress: 3.5.0 Electron sandbox problem - does not start on Debian CI - FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctlly
Current behavior:
3.5.0 cannot start on CI with Debian.
Error:
[2665:1024/095756.163047:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/jenkins/.cache/Cypress/3.5.0/Cypress/chrome-sandbox is owned by root and has mode 4755.
[2019-10-24T07:58:07.381Z] Platform: linux (Debian - 9.9)
Debug log:
2019-10-24T13:56:25.128Z cypress:cli verifying Cypress app
2019-10-24T13:56:25.130Z cypress:cli checking environment variables
2019-10-24T13:56:25.141Z cypress:cli checking if executable exists /home/jenkins/.cache/Cypress/3.5.0/Cypress/Cypress
2019-10-24T13:56:25.144Z cypress:cli Binary is executable? : true
2019-10-24T13:56:25.145Z cypress:cli binaryDir is /home/jenkins/.cache/Cypress/3.5.0/Cypress
2019-10-24T13:56:25.148Z cypress:cli Reading binary package.json from: /home/jenkins/.cache/Cypress/3.5.0/Cypress/resources/app/package.json
2019-10-24T13:56:25.154Z cypress:cli Found binary version 3.5.0 installed in: /home/jenkins/.cache/Cypress/3.5.0/Cypress
2019-10-24T13:56:25.158Z cypress:cli could not read binary_state.json file
2019-10-24T13:56:25.159Z cypress:cli {}
2019-10-24T13:56:25.159Z cypress:cli is Verified ? undefined
2019-10-24T13:56:25.159Z cypress:cli running binary verification check 3.5.0
It looks like this is your first time using Cypress: 3.5.0
[?25l[15:56:25] Verifying Cypress can run /home/jenkins/.cache/Cypress/3.5.0/Cypress [started]
2019-10-24T13:56:25.173Z cypress:cli clearing out the verified version
2019-10-24T13:56:25.175Z cypress:cli DISPLAY environment variable is set to :0 on Linux
Assuming this DISPLAY points at working X11 server,
Cypress will not spawn own Xvfb
NOTE: if the X11 server is NOT working, Cypress will exit without explanation,
see https://github.com/cypress-io/cypress/issues/4034
Solution: Unset the DISPLAY variable and try again:
DISPLAY= npx cypress run ...
2019-10-24T13:56:25.176Z cypress:cli needs Xvfb? false
2019-10-24T13:56:25.176Z cypress:cli spawning, should retry on display problem? true
2019-10-24T13:56:25.177Z cypress:cli running smoke test
2019-10-24T13:56:25.177Z cypress:cli using Cypress executable /home/jenkins/.cache/Cypress/3.5.0/Cypress/Cypress
2019-10-24T13:56:25.177Z cypress:cli smoke test command: /home/jenkins/.cache/Cypress/3.5.0/Cypress/Cypress --smoke-test --ping=251
2019-10-24T13:56:25.178Z cypress:cli smoke test timeout 30000 ms
2019-10-24T13:56:25.505Z cypress:cli Smoke test failed: { Error: Command failed: /home/jenkins/.cache/Cypress/3.5.0/Cypress/Cypress --smoke-test --ping=251
[15609:1024/155625.398363:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/jenkins/.cache/Cypress/3.5.0/Cypress/chrome-sandbox is owned by root and has mode 4755.
at makeError (/home/jenkins/workspace/ded_trigger-build-update-cypress@2/node_modules/cypress/node_modules/execa/index.js:172:9)
at Promise.all.then.arr (/home/jenkins/workspace/ded_trigger-build-update-cypress@2/node_modules/cypress/node_modules/execa/index.js:277:16)
at Object.dynatraceRegularInvoke [as doInvoke] (/opt/dynatrace/oneagent/agent/res/nodeagent/nodejsagent.js:1732:20)
at Object.a.safeInvoke (/opt/dynatrace/oneagent/agent/res/nodeagent/nodejsagent.js:1802:29)
at /opt/dynatrace/oneagent/agent/res/nodeagent/nodejsagent.js:6952:25
at process._tickCallback (internal/process/next_tick.js:68:7)
code: null,
stdout: '',
stderr:
'[15609:1024/155625.398363:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I\'m aborting now. You need to make sure that /home/jenkins/.cache/Cypress/3.5.0/Cypress/chrome-sandbox is owned by root and has mode 4755.\n',
failed: true,
signal: 'SIGTRAP',
cmd:
'/home/jenkins/.cache/Cypress/3.5.0/Cypress/Cypress --smoke-test --ping=251',
timedOut: false,
killed: false }
2019-10-24T13:56:25.508Z cypress:cli error message: [15609:1024/155625.398363:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/jenkins/.cache/Cypress/3.5.0/Cypress/chrome-sandbox is owned by root and has mode 4755.
[15:56:25] Verifying Cypress can run /home/jenkins/.cache/Cypress/3.5.0/Cypress [failed]
[?25hCypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
[15609:1024/155625.398363:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/jenkins/.cache/Cypress/3.5.0/Cypress/chrome-sandbox is owned by root and has mode 4755.
----------
Platform: linux (Debian - 9.9)
Cypress Version: 3.5.0
Additional --no-sandbox flag passed to electron could help, related issue on electron: https://github.com/electron/electron/issues/17972
Desired behavior:
It should run.
Steps to reproduce: (app code and test code)
- Run cypress 3.5.0 on Debian
Versions
Cypress 3.5.0 Debian - 9.9
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 25 (11 by maintainers)
Commits related to this issue
- Add cypress hotfix This can be reverted once the new version of cypress with this fix is released: https://github.com/cypress-io/cypress/issues/5434. — committed to radicle-dev/radicle-upstream by rudolfs 5 years ago
- Add cypress testing (#47) * Add cypress * Configure cypress * Add license to silence yarn warnings (#46) * Add cypress hotfix This can be reverted once the new version of cypress with thi... — committed to radicle-dev/radicle-upstream by rudolfs 5 years ago
- Add cypress testing (#47) * Add cypress * Configure cypress * Add license to silence yarn warnings (#46) * Add cypress hotfix This can be reverted once the new version of cypress with thi... — committed to radicle-dev/radicle-upstream by rudolfs 5 years ago
- Add cypress testing (#47) * Add cypress * Configure cypress * Add license to silence yarn warnings (#46) * Add cypress hotfix This can be reverted once the new version of cypress with thi... — committed to radicle-dev/radicle-upstream by rudolfs 5 years ago
- cypress: Upgrade to 3.5.0 Package source code needs to be patched to fix tests execution on Linux (courtesy of https://github.com/oscoin/mvp/commit/5f61adddcbade67ad027fff2a2aa163a821d2d3c). Remove ... — committed to SoftwareHeritage/swh-web by anlambert 5 years ago
We found this problem when running tests on Jenkins after installing cypress 3.5.0 trough ‘npm install’. We changed it to ‘npm ci’. For us it starts working again and even with faster installation process.
Patching works for me:
npm i -S patch-packagepatches/cypress+3.5.0.patch:package.json:True, I overlooked it 😦 With
npm ci cypress --save-devI getting cypress 3.4.1. Sorry for my misleading informations 😦