Cypress failed to start on a fresh install using npm
See original GitHub issueCurrent behavior
I installed cypress using npm and I got the following error.
It looks like this is your first time using Cypress: 9.2.1
Cypress failed to start.
This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
Please refer to the error below for more details.
----------
/Users/[username]/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --no-sandbox
/Users/[username]/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
/Users/[username]/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=803
----------
Platform: darwin-x64 (20.5.0)
Cypress Version: 9.2.1
Steps to reproduce
create-react-app cypress-test cd cypress-test npm install cypress --save-dev npx cypress open
Other informations
Os: macOs Big Sur version 11.4
Node : v15.0.1
nvm : 0.35.3
browser: Chrome Version 97.0.4692.71 (Official Build) (x86_64)
This is actually a simple set-up and it should work on a fresh install.
So far tried the following
- restarted the machine
- npx cypress cache clear
- npx cypress install
- npx cypress verify
but still getting the same error.
Debug logs
cypress:cli:cli cli starts with arguments ["/Users/fasalurahman/.nvm/versions/node/v15.0.1/bin/node","/Users/fasalurahman/Desktop/vitalthings/somnofy-webui/node_modules/.bin/cypress","run"] +0ms
cypress:cli NODE_OPTIONS is not set +0ms
cypress:cli:cli program parsing arguments +2ms
cypress:cli:cli running Cypress with args [ Command { _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:quiet': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 20, _maxListeners: undefined, commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], parent: Command { _events: [Object: null prototype], _eventsCount: 1, _maxListeners: undefined, commands: [Array], options: [Array], parent: null, _allowUnknownOption: false, _args: [], rawArgs: [Array], _scriptPath: '/Users/fasalurahman/Desktop/vitalthings/somnofy-webui/node_modules/.bin/cypress', _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _actionHandler: null, _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: undefined, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '<command> [options]', args: [Array], [Symbol(kCapture)]: false }, _allowUnknownOption: false, _args: [], rawArgs: null, _scriptPath: null, _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _actionHandler: [Function: listener], _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: 0, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, exit: true, args: [], [Symbol(kCapture)]: false } ] +0ms
cypress:cli:cli variable-length opts parsed { args: [ '/Users/fasalurahman/.nvm/versions/node/v15.0.1/bin/node', '/Users/fasalurahman/Desktop/vitalthings/somnofy-webui/node_modules/.bin/cypress', 'run' ], opts: Command { _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:quiet': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 20, _maxListeners: undefined, commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], parent: Command { _events: [Object: null prototype], _eventsCount: 1, _maxListeners: undefined, commands: [Array], options: [Array], parent: null, _allowUnknownOption: false, _args: [], rawArgs: [Array], _scriptPath: '/Users/fasalurahman/Desktop/vitalthings/somnofy-webui/node_modules/.bin/cypress', _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _actionHandler: null, _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: undefined, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '<command> [options]', args: [Array], [Symbol(kCapture)]: false }, _allowUnknownOption: false, _args: [], rawArgs: null, _scriptPath: null, _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _actionHandler: [Function: listener], _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: 0, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, exit: true, args: [], [Symbol(kCapture)]: false } } +104ms
cypress:cli parsed cli options {} +106ms
cypress:cli verifying Cypress app +0ms
cypress:cli checking environment variables +0ms
cypress:cli checking if executable exists /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress +2ms
cypress:cli Binary is executable? : true +1ms
cypress:cli binaryDir is /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app +0ms
cypress:cli Reading binary package.json from: /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/Resources/app/package.json +0ms
cypress:cli Found binary version 9.2.1 installed in: /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app +2ms
cypress:cli could not read binary_state.json file at "/Users/fasalurahman/Library/Caches/Cypress/9.2.1/binary_state.json" +3ms
cypress:cli {} +0ms
cypress:cli is Verified ? undefined +1ms
cypress:cli running binary verification check 9.2.1 +0ms
It looks like this is your first time using Cypress: 9.2.1
cypress:cli clearing out the verified version +5ms
cypress:cli Environment variable ELECTRON_RUN_AS_NODE detected, xvfb is not needed +0ms
cypress:cli needs Xvfb? false +0ms
cypress:cli spawning, should retry on display problem? false +0ms
cypress:cli disabling Electron sandbox +1ms
cypress:cli running smoke test +0ms
cypress:cli using Cypress executable /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress +0ms
cypress:cli smoke test command: /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=624 +0ms
cypress:cli smoke test timeout 30000 ms +0ms
cypress:cli Smoke test failed: Error: Command failed with exit code 9: /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=624
/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --no-sandbox
/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=624
at makeError (/Users/fasalurahman/Desktop/vitalthings/somnofy-webui/node_modules/cypress/node_modules/execa/lib/error.js:59:11)
at handlePromise (/Users/fasalurahman/Desktop/vitalthings/somnofy-webui/node_modules/cypress/node_modules/execa/index.js:114:26)
at processTicksAndRejections (node:internal/process/task_queues:93:5) {
shortMessage: 'Command failed with exit code 9: /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=624',
command: '/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=624',
exitCode: 9,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: '/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --no-sandbox\n' +
'/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test\n' +
'/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=624',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
} +47ms
cypress:cli error message: /Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --no-sandbox
/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
Cypress failed to start.
This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
Please refer to the error below for more details.
----------
/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --no-sandbox
/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
/Users/fasalurahman/Library/Caches/Cypress/9.2.1/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=624
----------
Platform: darwin-x64 (20.5.0)
Cypress Version: 9.2.1
Cypress Version
9.2.1
Package Manager
npm
Operating system
Mac
Other
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
node.js - Cypress failed to start on Windows
1 Cypress failed to start. This is usually caused by a missing library or dependency. The error below should indicate which dependency is...
Read more >Installing Cypress
npm install This will install Cypress locally as a dev dependency for your project. Make sure that you have already run npm...
Read more >cypress-io/cypress - Gitter
Cypress failed to start. This is usually caused by a missing library or dependency. The error below should indicate which dependency is missing....
Read more >How to Install Cypress for Test Automation
For users who are not acquainted with npm, yet want to try Cypress instantly, it is possible to directly download the zip file...
Read more >Common errors
Random errors · Some strange issues can be resolved by simply running npm cache clean and trying again. · If you are having...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
LOOOL. You know what I did? 😄 I went to the cache where cypress is stored (/Users/d.galyuk/Library/Caches/Cypress/9.2.0)… and tried to open it manually. The OS said that i need some stuff to install to open it. So I agreed. After it the Cypress started from here. And also can be now started from the terminal Damn. terminal does not allow for OS to show that some soft is needed to run properly… what a bug. here ya go
Dear Cypress DEVs… is it good or bad that i’ve installed rosetta? Any impact on cypress performance? What happened? New OS + chip did not understood some commands in Cypress to run? so it needed the binary translator? (it says in the notification that:
It seems that cypress cannot run natively on the new chip. Cypress have intel-based features and no new-chip-based features? interesting fact: iMac Air with 2020 chip and the same OS version works fine. Supposedly, maaaaybe some issue here.
Yep,
I propose to close this issue and to continue the discussion on these two possible solutions: