Cypress: Cypress fails to start on MacOS

Created on 4 Sep 2018  ·  3Comments  ·  Source: cypress-io/cypress

Current behavior:

Cypress fails to start

❯ DEBUG=cypress:* node_modules/.bin/cypress verify
  cypress:cli cli starts with arguments ["/usr/local/Cellar/node/10.7.0/bin/node","/Users/ryzen/Documents/we-achieve/node_modules/.bin/cypress","verify"] +0ms
  cypress:cli NODE_OPTIONS=--max_old_space_size=8192 +0ms
  cypress:cli program parsing arguments +2ms
  cypress:cli parsed cli options {} +1ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +0ms
  cypress:cli checking if executable exists /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/MacOS/Cypress +3ms
  cypress:cli Binary is executable? : true +1ms
  cypress:cli binaryDir is  /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app +0ms
  cypress:cli Reading binary package.json from: /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/Resources/app/package.json +0ms
  cypress:cli Found binary version 3.1.0 installed in: /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app +3ms
  cypress:cli could not read binary_state.json file +3ms
  cypress:cli {} +0ms
  cypress:cli is Verified ? undefined +1ms
  cypress:cli force verify +0ms
  cypress:cli running binary verification check 3.1.0 +0ms
It looks like this is your first time using Cypress: 3.1.0

  cypress:cli clearing out the verified version +3ms
  cypress:cli running smoke test +1ms
  cypress:cli using Cypress executable /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/MacOS/Cypress +0ms
  cypress:cli needs XVFB? false +0ms
  cypress:cli smoke test command: /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=515 +0ms
 ⠹  Verifying Cypress can run /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app
  cypress:cli Smoke test failed: { Error: Command failed: /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=515


    at makeError (/Users/ryzen/Documents/we-achieve/node_modules/cypress/node_modules/execa/index.js:174:9)
    at Promise.all.then.arr (/Users/ryzen/Documents/we-achieve/node_modules/cypress/node_modules/execa/index.js:278:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: null,
  stdout: '',
  stderr: '',
  failed: true,
  signal: 'SIGSEGV',
  cmd:
   '/Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=515',
  timedOut: false,
 ✖  Verifying Cypress can run /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app
   → Cypress Version: 3.1.0
Cypress 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.
----------

Command failed: /Users/ryzen/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=515
----------

Platform: darwin (17.4.0)
Cypress Version: 3.1.0

Desired behavior:

Cypress starts without issues

Steps to reproduce:

yarn install
node_modules/.bin/cypress verify

Versions

3.1.0

duplicate

Most helpful comment

I managed to get Cypress to start by removing this env var NODE_OPTIONS which was sent to --max_old_space_size=8192. However I need this env var set to make sure that cypress doesn't run out of memory.

All 3 comments

I managed to get Cypress to start by removing this env var NODE_OPTIONS which was sent to --max_old_space_size=8192. However I need this env var set to make sure that cypress doesn't run out of memory.

@carloscheddar I believe this is related to this issue on NODE_OPTIONS https://github.com/cypress-io/cypress/issues/1676

On High Sierra cypress segfaults for me if NODE_OPTIONS=--max_old_space_size=4096 _or_ if NODE_OPTIONS="".

I have to unset NODE_OPTIONS for cypress not to segfault.

Versions:

Cypress 3.1.0
macOS 10.13.6
node 10.8.0

From https://github.com/cypress-io/cypress/issues/1676#issuecomment-414526300

Was this page helpful?
0 / 5 - 0 ratings