Bad Option: --no-sandbox thrown when ELECTRON_RUN_AS_NODE=1
See original GitHub issueCurrent behavior
I am working to integrate cypress testing into our CI. I was getting Xvfb errors, so I started using the ELECTRON_RUN_AS_NODE=1
env variable.
However, when that variable is fixed, it fixes the Xvfb errors but causes some bad option errors.
build 23-Sep-2021 15:20:16 > cypress run --config-file ./e2e/cypressAngular.headless.json --headless -b chrome
build 23-Sep-2021 15:20:16
build 23-Sep-2021 15:20:16 It looks like this is your first time using Cypress: 8.3.0
build 23-Sep-2021 15:20:16
build 23-Sep-2021 15:20:16 [STARTED] Task without title.
error 23-Sep-2021 15:20:17 [FAILED] Cypress failed to start.
build 23-Sep-2021 15:20:17 Cypress failed to start.
build 23-Sep-2021 15:20:17
build 23-Sep-2021 15:20:17 This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
build 23-Sep-2021 15:20:17
build 23-Sep-2021 15:20:17 Please refer to the error below for more details.
build 23-Sep-2021 15:20:17
build 23-Sep-2021 15:20:17 ----------
build 23-Sep-2021 15:20:17
build 23-Sep-2021 15:20:17 /usr/local/bamboo/.cache/Cypress/8.3.0/Cypress/Cypress: bad option: --no-sandbox
build 23-Sep-2021 15:20:17 /usr/local/bamboo/.cache/Cypress/8.3.0/Cypress/Cypress: bad option: --smoke-test
build 23-Sep-2021 15:20:17 /usr/local/bamboo/.cache/Cypress/8.3.0/Cypress/Cypress: bad option: --ping=68
build 23-Sep-2021 15:20:17
build 23-Sep-2021 15:20:17 ----------
build 23-Sep-2021 15:20:17
build 23-Sep-2021 15:20:17 Platform: linux (CentOS - 7.9.2009)
build 23-Sep-2021 15:20:17 Cypress Version: 8.3.0
Desired behavior
Run the tests
Test code to reproduce
My configuration is:
{
"fileServerFolder": ".",
"fixturesFolder": "./e2e/fixtures",
"integrationFolder": "./e2e/integration",
"modifyObstructiveCode": false,
"pluginsFile": "./e2e/plugins/index.ts",
"supportFile": "./e2e/support/index.ts",
"video": false,
"videosFolder": "./e2e/videos",
"screenshotsFolder": "./e2e/screenshots",
"chromeWebSecurity": false,
"baseUrl": "http://localhost:4200",
"viewportHeight": 960,
"viewportWidth": 1536,
"env": {
"tsConfig": "./e2e/tsconfig.json"
},
"ignoreTestFiles": [
"**/__snapshots__/*",
"**/__image_snapshots__/*"
]
}
I am also setting the env var ELECTRON_RUN_AS_NODE=1
externally by using export ELECTRON_RUN_AS_NODE=1
Cypress Version
v8.3.0 (Also tested in 8.4.1)
Other
Not sure if the issue is related or not, but I can’t test this issue locally because when I set the ELECTRON_RUN_AS_NODE=1
env variable I get the error Error: Cannot find module '/Users/reidkersey/Library/Caches/Cypress/8.3.0/Cypress.app/Contents/MacOS/Contents/Resources/app/index.js'
I have also tried setting "ELECTRON_RUN_AS_NODE": "1"
in the env section of the config file, and that didn’t work, and gave me the Xvfb error.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:6
Top GitHub Comments
Same here with cypress 10.3.1
Same thing with Cypress 9.7.0, and I am using Chrome