Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading and Crashing issues with Cypress v3.0.1 #1866

Closed
Stormdoodle opened this issue Jun 4, 2018 · 64 comments
Closed

Loading and Crashing issues with Cypress v3.0.1 #1866

Stormdoodle opened this issue Jun 4, 2018 · 64 comments

Comments

@Stormdoodle
Copy link

Stormdoodle commented Jun 4, 2018

Current behavior:

When I try to run Cypress via npm I get the following:

C:\Users\aallford\Documents\elprd-risk-assessment-app>C:\Users\aallford\Documents\elprd-risk-assessment-app\node_modules\.bin\cypress run

It looks like this is your first time using Cypress: 3.0.1

 ×  Verifying Cypress can run C:\Users\aallford\AppData\Local\Cypress\Cache\3.0.1\Cypress
   → Cypress Version: 3.0.1
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.
----------
----------

Platform: win32 (6.3.9600)
Cypress Version: 3.0.1

ALSO
If I try to run Cypress from the local install of 3.0.1, it crashes when I try to run an integration test.

Desired behavior:

Cypress will open from npm, and not crash and close if run from local install

Steps to reproduce:

As Current behaviour

Versions

Cypress = v3.0.1
OS = Win 8
Browser = Chrome

@Stormdoodle
Copy link
Author

I completely deleted my version of Cypress and installed it again and it is now working.

Still got an issue through npm though

@kuceb
Copy link
Contributor

kuceb commented Jun 4, 2018

@Stormdoodle looking into this, which files are you referring to "completely deleting my version of Cypress" ?

"Still got an issue through npm though"

Can you explain what you mean by this ?

@kuceb kuceb added the stage: needs information Not enough info to reproduce the issue label Jun 4, 2018
@Stormdoodle
Copy link
Author

Stormdoodle commented Jun 4, 2018

@bkucera I mean I uninstalled Cypress that was locally installed. Reinstalled it from the most recent (3.0.1) release and my local version is now working and allowing me to run integration tests.

My other issue (or the original issue) is when I try to launch Cypress from Visual Studio Code using node_modules\.bin\cypress run is still giving me an error:
capture

@kuceb
Copy link
Contributor

kuceb commented Jun 4, 2018

@Stormdoodle ok, strage that Cypress failed with a dependency error but didn't tell you which one. Can you run the following?

set DEBUG=cypress*
node_modules\.bin\cypress run

?

@Stormdoodle
Copy link
Author

Stormdoodle commented Jun 4, 2018

@bkucera
I ran what you suggested and got the following:

C:\Users\aallford\Documents\elprd-risk-assessment-app>set DEBUG=cypress*

C:\Users\aallford\Documents\elprd-risk-assessment-app>node_modules\.bin\cypress run

  cypress:cli cli starts with arguments ["C:\\Program Files\\nodejs\\node.exe","C:\\Users\\aallford\\Documents\\elprd-risk-assessment-app\\node_modules\\cypress\\bin\\cypress","run"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli program parsing arguments +2ms
  cypress:cli running Cypress +1ms
  cypress:cli parsed cli options {} +328ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +1ms
  cypress:cli checking if executable exists C:\Users\aallford\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe +2ms
  cypress:cli binaryDir is  C:\Users\aallford\AppData\Local\Cypress\Cache\3.0.1\Cypress +1ms
  cypress:cli Found binary version 3.0.1 installed in: C:\Users\aallford\AppData\Local\Cypress\Cache\3.0.1\Cypress +3ms
  cypress:cli could not read binary_state.json file +0ms
  cypress:cli {} +1ms
  cypress:cli is Verified ? undefined +2ms
  cypress:cli running binary verification check 3.0.1 +1ms
It looks like this is your first time using Cypress: 3.0.1

  cypress:cli clearing out the verified version +2ms
  cypress:cli running smoke test +3ms
  cypress:cli using Cypress executable C:\Users\aallford\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe +0ms
  cypress:cli needs XVFB? false +1ms
  cypress:cli smoke test command: C:\Users\aallford\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe --smoke-test --ping=567 +0ms
 ×  Verifying Cypress can run C:\Users\aallford\AppData\Local\Cypress\Cache\3.0.1\Cypress
   → Cypress Version: 3.0.1
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.
----------
----------

Platform: win32 (6.3.9600)
Cypress Version: 3.0.1

@kuceb
Copy link
Contributor

kuceb commented Jun 4, 2018

@Stormdoodle thanks! How are you getting Cypress to work currently? You said you got it working, how are you running it, from where? How is that different than this failure?

@Stormdoodle
Copy link
Author

@bkucera I have a local install of Cypress (Direct Download install) and open my project solution from within the application. My project has 3.0.1 saved as a Dev dependency. My problem/issue is that I can't open Cypress from within Visual Studio Code using the npm/npx methods/

@jennifer-shehane jennifer-shehane added stage: needs investigating Someone from Cypress needs to look at this and removed stage: needs information Not enough info to reproduce the issue labels Jun 5, 2018
@filipenevola
Copy link

Same here

DEBUG=cypress* node_modules/.bin/cypress run

  cypress:cli cli starts with arguments ["/usr/local/Cellar/node/9.11.1/bin/node","/Users/filipenevola/Documents/quave/ws/bemarke/node_modules/.bin/cypress","run"] +0ms
  cypress:cli NODE_OPTIONS=--max-old-space-size=4096 +0ms
  cypress:cli program parsing arguments +3ms
  cypress:cli running Cypress +1ms
  cypress:cli parsed cli options {} +88ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +0ms
  cypress:cli checking if executable exists /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/MacOS/Cypress +12ms
  cypress:cli binaryDir is  /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app +2ms
  cypress:cli Found binary version 3.0.1 installed in: /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app +2ms
  cypress:cli could not read binary_state.json file +0ms
  cypress:cli {} +0ms
  cypress:cli is Verified ? undefined +1ms
  cypress:cli running binary verification check 3.0.1 +0ms
It looks like this is your first time using Cypress: 3.0.1

  cypress:cli clearing out the verified version +2ms
  cypress:cli running smoke test +1ms
  cypress:cli using Cypress executable /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/MacOS/Cypress +0ms
  cypress:cli needs XVFB? false +0ms
  cypress:cli smoke test command: /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=282 +1ms
 ✖  Verifying Cypress can run /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app
   → Cypress Version: 3.0.1
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.
----------
----------

Platform: darwin (17.6.0)
Cypress Version: 3.0.1

@kuceb
Copy link
Contributor

kuceb commented Jun 15, 2018

@Stormdoodle @filipenevola what are your node versions?

@SeriousM
Copy link

The problem in #1959 is isolated by running this commands in docker windows container mode:

C:\> docker run -it --rm stefanscherer/node-windows:8-nanoserver cmd
# switches into container
C:\> mkdir work
C:\> cd work
C:\work> npm i -y
C:\work> npm i --save-dev cypress@3.0.1
# till now everything works well
C:\work> set DEBUG=*
C:\work> node_modules\.bin\cypress verify

The node version is in this case node v8 but also fails with node v10.

@filipenevola
Copy link

@bkucera

node --version
v9.11.1

I really want to try cypress out but the installation problems are real and I'm not able to get it running.

@kuceb
Copy link
Contributor

kuceb commented Jun 18, 2018

@filipenevola @SeriousM
There is a very good chance this is a permissions issue. We've got enhanced error logs coming out in the next release that should tell you the exact error.
I suspect you are downloading the Cypress binary as one user, and attempting to launch Cypress as another. This goes for Administrator privileges as well: in a Dockerfile you execute commands as root by default, and when you run the Cypress, you may not have root.
This is clearly an issue specific to your setup, and I'm sure that tweaking your environment will solve the issue.

For macos, try installing node via nvm, or another node versioning tool that installs node in the user space, not /usr/.... For @filipenevola the location of your node binary is suspect: usr/local/Cellar/node/9.11.1/bin/node

@SeriousM
Copy link

I suspect you are downloading the Cypress binary as one user, and attempting to launch Cypress as another. This goes for Administrator privileges as well: in a Dockerfile you execute commands as root by default, and when you run the Cypress, you may not have root.

I checked every single step and I'm always the same user (administrator).

@kuceb
Copy link
Contributor

kuceb commented Jun 18, 2018

@SeriousM can you try lauching the Cypress binary directly via .cache/Cypress/3.0.1/Cypress/Cypress.exe ? This might give you the reason Cypress failed to launch

@SeriousM
Copy link

can you try lauching the Cypress binary directly

I did, but sadly none of my tries exposed any result..

C:\work>C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe --smoke-test

C:\work>C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe --smoke-test --ping=573

C:\work>C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe --help

C:\work>C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe verify

C:\work>C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe

C:\work>dir C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.1\Cypress\Cypress.exe
 Volume in drive C has no label.
 Volume Serial Number is 74B0-DF79

 Directory of C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.1\Cypress

06/19/2018  06:16 AM        85,785,600 Cypress.exe
               1 File(s)     85,785,600 bytes
               0 Dir(s)  20,442,939,392 bytes free

@brian-mann
Copy link
Member

Can any of you link us to the windows docker container you're using or maybe your docker script so we can reproduce on our end?

@SeriousM
Copy link

#1866 (comment)

It's there, just a few posts before.

@filipenevola
Copy link

filipenevola commented Jun 19, 2018

@bkucera I'm running with nvm now:

cypress-validation nvm which current
/Users/filipenevola/.nvm/versions/node/v8.11.3/bin/node

and I got this error

➜  cypress-validation npm run cypress:open

> cypress-validation@1.0.0 cypress:open /Users/filipenevola/Documents/quave/ws/cypress-validation
> cypress open


It looks like this is your first time using Cypress: 3.0.1

 ✖  Verifying Cypress can run /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app
   → Cypress Version: 3.0.1
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.
----------
----------

Platform: darwin (17.6.0)
Cypress Version: 3.0.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress-validation@1.0.0 cypress:open: `cypress open`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cypress-validation@1.0.0 cypress:open script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/filipenevola/.npm/_logs/2018-06-19T21_31_28_131Z-debug.log

just to be clear, I run a lot of node projects in this machine without any problem, the only one that is not working is cypress and I see a lot of people complaining about this. Looks like there is something wrong on your end.

cypress promises to be the easiest solution that will make my life a lot easier with end-to-end testing but I'm not able to install it 😞, I really want to try this out because I already implemented end-to-end tests with a lot of different tools but I already spent a lot of time trying to make cypress works and that is frustrating.

I don't know what else to do, I already read everything that I could find online and I already tried in my Ubuntu machine too, I also got problems there. I really don't believe the problem is on my end when everything except cypress is working fine.

If you have more alternatives for me to try I will be happy to do it.

/Users/filipenevola/.npm/_logs/2018-06-19T21_31_28_131Z-debug.log content below

0 info it worked if it ends with ok
1 verbose cli [ '/Users/filipenevola/.nvm/versions/node/v8.11.3/bin/node',
1 verbose cli   '/Users/filipenevola/.nvm/versions/node/v8.11.3/bin/npm',
1 verbose cli   'run',
1 verbose cli   'cypress:open' ]
2 info using npm@5.6.0
3 info using node@v8.11.3
4 verbose run-script [ 'precypress:open', 'cypress:open', 'postcypress:open' ]
5 info lifecycle cypress-validation@1.0.0~precypress:open: cypress-validation@1.0.0
6 info lifecycle cypress-validation@1.0.0~cypress:open: cypress-validation@1.0.0
7 verbose lifecycle cypress-validation@1.0.0~cypress:open: unsafe-perm in lifecycle true
8 verbose lifecycle cypress-validation@1.0.0~cypress:open: PATH: /Users/filipenevola/.nvm/versions/node/v8.11.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/filipenevola/Documents/quave/ws/cypress-validation/node_modules/.bin:/Users/filipenevola/.nvm/versions/node/v8.11.3/bin:/Users/filipenevola/bin:/usr/local/bin:/Users/filipenevola/Library/Android/sdk:/Users/filipenevola/Library/Android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle cypress-validation@1.0.0~cypress:open: CWD: /Users/filipenevola/Documents/quave/ws/cypress-validation
10 silly lifecycle cypress-validation@1.0.0~cypress:open: Args: [ '-c', 'cypress open' ]
11 silly lifecycle cypress-validation@1.0.0~cypress:open: Returned: code: 1  signal: null
12 info lifecycle cypress-validation@1.0.0~cypress:open: Failed to exec cypress:open script
13 verbose stack Error: cypress-validation@1.0.0 cypress:open: `cypress open`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/filipenevola/.nvm/versions/node/v8.11.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/Users/filipenevola/.nvm/versions/node/v8.11.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid cypress-validation@1.0.0
15 verbose cwd /Users/filipenevola/Documents/quave/ws/cypress-validation
16 verbose Darwin 17.6.0
17 verbose argv "/Users/filipenevola/.nvm/versions/node/v8.11.3/bin/node" "/Users/filipenevola/.nvm/versions/node/v8.11.3/bin/npm" "run" "cypress:open"
18 verbose node v8.11.3
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error cypress-validation@1.0.0 cypress:open: `cypress open`
22 error Exit status 1
23 error Failed at the cypress-validation@1.0.0 cypress:open script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@lazytesting
Copy link

Same issue here after I installed Cypress as a dependency of my nodejs project. Finally found a workaround.

  1. clear C:\Users[username]\AppData\Local\Cypress\Cache
  2. start a command prompt as administrator
  3. run npm i cypress -g
  4. run cypress open (not sure if this is needed)
  5. close command prompt
  6. return back to your node.js project and run the tests

@kuceb
Copy link
Contributor

kuceb commented Jun 22, 2018

@filipenevola wow, I'm surprised that didn't work 😞
Did you install the binary with nvm? Try deleting the ~/.cache/Cypress folder and installing with your node under nvm
Also can you try executing the binary directly from /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/MacOS/Cypress ?

@kuceb
Copy link
Contributor

kuceb commented Jun 22, 2018

@lazytesting what node version are you on? I've never been able to reproduce this.

@filipenevola
Copy link

filipenevola commented Jun 25, 2018

@bkucera I got

➜  ~ /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/MacOS/Cypress ; exit;
[1]    49987 segmentation fault 

I also cleaned the cache and installed it again but no luck

➜  bemarke git:(development) ✗ node_modules/.bin/cypress open

It looks like this is your first time using Cypress: 3.0.1

 ✖  Verifying Cypress can run /Users/filipenevola/Library/Caches/Cypress/3.0.1/Cypress.app
   → Cypress Version: 3.0.1
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.
----------
----------

Platform: darwin (17.6.0)
Cypress Version: 3.0.1

@lazytesting
Copy link

@bkucera I'm running node v8.11.1 and npm 5.8.0 via NVM for Windows.

@kuceb
Copy link
Contributor

kuceb commented Jun 25, 2018

@filipenevola one more thing, Trying to see if we can get more info about the seg fault, can you execute the binary directly with DEBUG=cypress:* set?

@SeriousM
Copy link

SeriousM commented Jul 2, 2018

Hi, here's an update with 3.0.2, done with the docker setup described above:

C:\>set DEBUG=cypress:*

C:\>cypress verify
  cypress:cli cli starts with arguments ["C:\\nodejs\\node.exe","C:\\nodejs\\node_modules\\cypress\\bin\\cypress","verify"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli program parsing arguments +0ms
  cypress:cli parsed cli options {} +0ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +0ms
  cypress:cli checking if executable exists C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress\Cypress.exe +0ms
  cypress:cli Binary is executable? : true +0ms
  cypress:cli binaryDir is  C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress +0ms
  cypress:cli Reading binary package.json from: C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress\resources\app\package.json +0ms
  cypress:cli Found binary version 3.0.2 installed in: C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress +0ms
  cypress:cli could not read binary_state.json file +15ms
  cypress:cli {} +0ms
  cypress:cli is Verified ? undefined +15ms
  cypress:cli force verify +0ms
  cypress:cli running binary verification check 3.0.2 +0ms
It looks like this is your first time using Cypress: 3.0.2

  cypress:cli clearing out the verified version +0ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress\Cypress.exe +0ms
  cypress:cli needs XVFB? false +0ms
  cypress:cli smoke test command: C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress\Cypress.exe --smoke-test --ping=259 +0ms
 \  Verifying Cypress can run C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress
  cypress:cli Smoke test failed: { Error: Command failed: C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress\Cypress.exe --smoke-test --ping=259


    at makeError (C:\nodejs\node_modules\cypress\node_modules\execa\index.js:172:9)
    at Promise.all.then.arr (C:\nodejs\node_modules\cypress\node_modules\execa\index.js:277:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 3221225781,
  stdout: '',
  stderr: '',
  failed: true,
  signal: null,
  cmd: 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Cypress\\Cache\\3.0.2\\Cypress\\Cypress.exe --smoke-test --ping=259',
  timedOut: false,
 ?  Verifying Cypress can run C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress
   ? Cypress Version: 3.0.2
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: C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\3.0.2\Cypress\Cypress.exe --smoke-test --ping=259
----------

Platform: win32 (10.0.17134)
Cypress Version: 3.0.2

@daanvanhulst
Copy link

I tried running cypress from my package.json using the following script:

"test:e2e": "cypress run --spec 'e2e/**/*'",

It works if I remove the 'test:' part it works:

"e2e": "cypress run --spec 'e2e-test/**/*'",

@seth-wat
Copy link

seth-wat commented Sep 22, 2018

The below solution worked, unfortunately now Cypress is installed globally. I see a lot of people suggesting solutions that have to do with Docker or Mac, please note that the issue is concerning Windows dev machines. The error message Cypress gives is not applicable.

Same issue here after I installed Cypress as a dependency of my nodejs project. Finally found a workaround.

  1. clear C:\Users[username]\AppData\Local\Cypress\Cache
  2. start a command prompt as administrator
  3. run npm i cypress -g
  4. run cypress open (not sure if this is needed)
  5. close command prompt
  6. return back to your node.js project and run the tests

Edit: I cleared my node modules and re-ran npm install, Cypress now opens with npx cypress open, I'm no longer getting the dependency error.

@jaredtbates
Copy link
Contributor

One of our devs was seeing this issue, turns out the only difference between his and my machine was he was using cmd, I was using PowerShell. Not sure why, but he switched to PowerShell and it solved the issue.

@rsenna
Copy link

rsenna commented Oct 8, 2018

To me, the issue was only fixed after i) I cleared cypress cache, and then ii) I was forced to run cypress install. Nothing else seems to have fixed the issue, at least in my case.

@filipenevola
Copy link

I'm still not able to run cypress.

I already tried everything above many times.

My current error is:

npx cypress open            
It looks like this is your first time using Cypress: 3.1.0

 ✖  Verifying Cypress can run /Users/filipenevola/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/filipenevola/Library/Caches/Cypress/3.1.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=898
----------

Platform: darwin (17.7.0)
Cypress Version: 3.1.0

@skumar7
Copy link

skumar7 commented Oct 23, 2018

It worked after doing this for me.
Step1: Delete the cache folder Library/Caches/Cypress/
Step2: Run cypress install npm command locally.

This will download and install cypress as a fresh copy.

@D-Alexis
Copy link

I had the exact same problem, and installing " Microsoft Visual C++ Redistributable for Visual Studio 2017" resolved it. I had to also delete ..\AppData\Local\Cypress\Cache .

The problem didn't occur on a computer with the same setup which already had the 2017 Redistributable.

@Saibamen
Copy link
Contributor

Add this to package.json:

"scripts": {
    "cypress": "cypress"
}

And run it with npm run cypress open (GUI) or npm run cypress run

@jmykp
Copy link

jmykp commented Mar 7, 2019

This solution fixed the issue for me.

@kuceb
Copy link
Contributor

kuceb commented Mar 7, 2019

@filipenevola you should try unsetting the NODE_OPTIONS env var as @jkoop mentioned, since your logs indicate you have it set:

MacOS / Linux

unset NODE_OPTIONS # this is not the same as export NODE_OPTIONS=

DO NOT USE set NODE_OPTIONS= on MacOS/Linux


Windows

set NODE_OPTIONS=

DO NOT USE set NODE_OPTIONS= on MacOS/Linux

This is due to an Electron bug, where having NODE_OPTIONS set causes either a failure or arguments to be ignored. electron/electron#12695 (comment)

@Saibamen
Copy link
Contributor

Saibamen commented Mar 8, 2019

#1607 (comment)

@filipenevola
Copy link

Wow. Thank you @bkucera, now it worked. It seems like that was the issue since always. Now I can finally run cypress and really start to use it. Thank you again!

As I'm always using NODE_OPTIONS for other projects I'll have to always disable it for Cypress but better than nothing ;) at least now I can use Cypress.

@linhsonit
Copy link

linhsonit commented May 7, 2019

Congrats @filipenevola . I do the same as you but it's still get the same error. Could you please show the final configuration?

This is what i am doing:

  • set NODE_OPTIONS=
  • cache clean --force
  • npm install
  • set DEBUG=cypress:*
  • cypress:run

@filipenevola
Copy link

Hi @linhsonit , I'm always running cypress like this
unset NODE_OPTIONS && cypress open

you can add this to your package.json
"cypress:open": "unset NODE_OPTIONS && cypress open"
and run with
yarn cypress:open

@linhsonit
Copy link

Awesome! Thank you @filipenevola . It's worked.
I am very happy now.

@JadedBlueEyes
Copy link

For me, what fixed it was intalling the Visual C++ redistributable :
https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads

@jennifer-shehane
Copy link
Member

We did make a few updates recently to cypress verify, so please update to the latest version and retry - also post any DEBUG logs if it is still erroring.

@marcenacp
Copy link

I still have the problem on the latest release. It occurs randomly on Gitlab CI when running tests on an Ubuntu (16.04 in Docker) without using cache. Is it possible to bypass this verify check?

I cannot post any more log, as Cypress does not even start.

+ npm run cypress:run

It looks like this is your first time using Cypress: 3.3.1

[19:28:50]  Verifying Cypress can run /root/.cache/Cypress/3.3.1/Cypress [started]
[19:29:01]  Verifying Cypress can run /root/.cache/Cypress/3.3.1/Cypress [failed]
Cypress verification timed out.

This command failed with the following output:

/root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=563

----------

Command failed: /root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=563

----------

Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 3.3.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ui@0.0.1 cypress:run: `cypress run --key fae232b4-8625-419d-8df2-6dac9efb07c3 --browser chrome`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ui@0.0.1 cypress:run script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-06-27T19_29_01_361Z-debug.log

@kuceb
Copy link
Contributor

kuceb commented Jun 30, 2019

@marcenacp please enable debug logs as mentioned above when posting error logs

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jul 1, 2019

We will be closing this issue in favor of #4624 in order to direct better focus on the overall problem that is being described in several issues - please add any information about how we can reproduce this bug there. 🙏

Also, if you are seeing the error code 3221225781 see this issue instead #4625

@jennifer-shehane jennifer-shehane removed the stage: needs investigating Someone from Cypress needs to look at this label Jul 24, 2019
@sydneybmunizaga
Copy link

sydneybmunizaga commented Aug 7, 2019

@jennifer-shehane I don't know if this would be helpful at this point. But a fix that happened for us for my co-worker that ran into the exact same error, using Docker on Macs is that we needed to bump up the memory in the Docker settings.
If you go to Docker preferences and click on Advanced, you can adjust the memory there.
My co-worker bumped it up to 5.0 GiB, and that solved his [cypress-test] Error 22.

Screen Shot 2019-08-07 at 11 05 36 AM

@jennifer-shehane
Copy link
Member

@sydneybarlow Please comment in the main issue in order to have all conversation in one place #4625

@cypress-io cypress-io locked and limited conversation to collaborators Jan 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests