-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Failure to start Cypress on a fresh install nvm #3116
Comments
I am not able to recreate this issue with the directions provided. I am using darwin 17.7.0 |
What information would you like me to provide for this? |
Same here 🙄
npx cypress open
It looks like this is your first time using Cypress: 3.1.4
✖ Verifying Cypress can run /Users/fabien/Library/Caches/Cypress/3.1.4/Cypress.app
→ Cypress Version: 3.1.4
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/fabien/Library/Caches/Cypress/3.1.4/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=584
----------
Platform: darwin (18.2.0)
Cypress Version: 3.1.4
|
I am having this problem too. Started suddenly today. Prior to this it was working ok. |
I'm running into the same issue on windows as well off of a fresh install. How to repeat |
Can you try clearing your Cypress cache then rerunning the command (suggesting based on #3176, #3212).
|
Already done without any solution :(
|
@jennifer-shehane I tried this, I got the same error. |
If you're commenting in this issue, please provide your Operating System, browser name & version - any special configuration. |
You just changed I really don't want to come off as aggressive or annoying. I'm fine with any of "we're looking into the issue", "I'm not able to reproduce can you help me isolate" "I'd like to take you up on your offer to look into it" or "we don't support running cypress with an nvm environment" :) How can I help move this forward? |
We haven't been able to reproduce the issue with any of the information provided and I don't see any leads or patterns on what could be the cause behind the issue, so there would have to be some new information revealed in order for this to move forward. I thought that clearing the cache may fix the issue, which is why I was awaiting response back on whether it did. I recently ran across another issue that had this I'd suggest maybe running Cypress in debug mode mode and printing the logs here like I indicated there. |
Here is the output with debug mode enabled: DEBUG=cypress:* ./node_modules/cypress/bin/cypress open
cypress:cli cli starts with arguments ["/Users/fabien/.nvm/versions/node/v8.10.0/bin/node","/Users/fabien/Projects/@product/webapp/node_modules/cypress/bin/cypress","open"] +0ms
cypress:cli NODE_OPTIONS=--max-old-space-size=4096 +0ms
cypress:cli program parsing arguments +2ms
cypress:cli opening Cypress +1ms
cypress:cli parsed cli options {} +101ms
cypress:cli opening from options {"project":"/Users/fabien/Projects/@product/webapp"} +0ms
cypress:cli command line arguments ["--project","/Users/fabien/Projects/@product/webapp"] +0ms
cypress:cli verifying Cypress app +0ms
cypress:cli checking environment variables +2ms
cypress:cli checking if executable exists /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app/Contents/MacOS/Cypress +12ms
cypress:cli Binary is executable? : true +1ms
cypress:cli binaryDir is /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app +0ms
cypress:cli Reading binary package.json from: /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app/Contents/Resources/app/package.json +0ms
cypress:cli Found binary version 3.1.5 installed in: /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app +2ms
cypress:cli could not read binary_state.json file +3ms
cypress:cli {} +0ms
cypress:cli is Verified ? undefined +2ms
cypress:cli running binary verification check 3.1.5 +0ms
It looks like this is your first time using Cypress: 3.1.5
cypress:cli clearing out the verified version +2ms
cypress:cli running smoke test +1ms
cypress:cli using Cypress executable /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app/Contents/MacOS/Cypress +0ms
cypress:cli needs XVFB? false +0ms
cypress:cli smoke test command: /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=301 +0ms
⠴ Verifying Cypress can run /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app
cypress:cli Smoke test failed: { Error: Command failed: /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=301
at makeError (/Users/fabien/Projects/@product/webapp/node_modules/execa/index.js:172:9)
at Promise.all.then.arr (/Users/fabien/Projects/@product/webapp/node_modules/execa/index.js:277:16)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
code: null,
stdout: '',
stderr: '',
failed: true,
signal: 'SIGSEGV',
cmd: '/Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=301',
timedOut: false,
✖ Verifying Cypress can run /Users/fabien/Library/Caches/Cypress/3.1.5/Cypress.app
→ Cypress Version: 3.1.5
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/fabien/Library/Caches/Cypress/3.1.5/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=301
----------
Platform: darwin (18.2.0)
Cypress Version: 3.1.5 from macOS Mojave 10.14.3 (18D42) |
I have cleared the cache before submitting this issue - not that it'd matter because it was on a fresh install. Again - If this is just low priority, at the "no time for this issue at the moment", it's fine to say so and say you don't support nvm/n. |
Getting the same, albeit on Circle CI machine (running I've did the following steps: (as per this guide)
...
- save_cache:
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/.cache ## cache both yarn and Cypress!
...
circleci@14e1287d0d44:~/redactedRepository$ sudo apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
Reading package lists... Done
Building dependency tree
Reading state information... Done
libasound2 is already the newest version (1.1.3-5).
libgconf-2-4 is already the newest version (3.2.6-4+b1).
libgtk2.0-0 is already the newest version (2.24.31-2).
libnotify-dev is already the newest version (0.7.7-2).
libxss1 is already the newest version (1:1.2.2-1).
libnss3 is already the newest version (2:3.26.2-1.1+deb9u1).
xvfb is already the newest version (2:1.19.2-1+deb9u5).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
circleci@14e1287d0d44:~/redactedRepository$ yarn cypress run
yarn run v1.12.3
$ /home/circleci/redactedRepository/node_modules/.bin/cypress run
It looks like this is your first time using Cypress: 3.1.5
[12:43:11] Verifying Cypress can run /home/circleci/.cache/Cypress/3.1.5/Cypress [started]
[12:43:11] Verifying Cypress can run /home/circleci/.cache/Cypress/3.1.5/Cypress [failed]
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: /home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=392
----------
Platform: linux (Debian - 9.6)
Cypress Version: 3.1.5
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
circleci@14e1287d0d44:~/redactedRepository$ yarn cypress cache clear
yarn run v1.12.3
$ /home/circleci/redactedRepository/node_modules/.bin/cypress cache clear
Done in 1.23s.
circleci@14e1287d0d44:~/redactedRepository$ yarn cypress install
yarn run v1.12.3
$ /home/circleci/redactedRepository/node_modules/.bin/cypress install
Installing Cypress (version: 3.1.5)
[12:42:13] Downloading Cypress [started]
[12:42:14] Downloading Cypress [completed]
[12:42:14] Unzipping Cypress [started]
[12:42:49] Unzipping Cypress [completed]
[12:42:49] Finishing Installation [started]
[12:42:49] Finishing Installation [completed]
You can now open Cypress by running: node_modules/.bin/cypress open
https://on.cypress.io/installing-cypress
Done in 37.88s.
circleci@14e1287d0d44:~/redactedRepository$ DEBUG=cypress:* yarn cypress verify
yarn run v1.12.3
$ /home/circleci/redactedRepository/node_modules/.bin/cypress verify
cypress:cli cli starts with arguments ["/usr/local/bin/node","/home/circleci/redactedRepository/node_modules/.bin/cypress","verify"] +0ms
cypress:cli NODE_OPTIONS is not set +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 /home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress +2ms
cypress:cli Binary is executable? : true +3ms
cypress:cli binaryDir is /home/circleci/.cache/Cypress/3.1.5/Cypress +1ms
cypress:cli Reading binary package.json from: /home/circleci/.cache/Cypress/3.1.5/Cypress/resources/app/package.json +0ms
cypress:cli Found binary version 3.1.5 installed in: /home/circleci/.cache/Cypress/3.1.5/Cypress +1ms
cypress:cli could not read binary_state.json file +2ms
cypress:cli {} +0ms
cypress:cli is Verified ? undefined +1ms
cypress:cli force verify +0ms
cypress:cli running binary verification check 3.1.5 +0ms
It looks like this is your first time using Cypress: 3.1.5
[12:43:23] Verifying Cypress can run /home/circleci/.cache/Cypress/3.1.5/Cypress [started]
cypress:cli clearing out the verified version +4ms
cypress:cli running smoke test +1ms
cypress:cli using Cypress executable /home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress +0ms
cypress:cli needs XVFB? false +0ms
cypress:cli smoke test command: /home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=310 +0ms
cypress:cli Smoke test failed: { Error: Command failed: /home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=310
at makeError (/home/circleci/redactedRepository/node_modules/execa/index.js:172:9)
at Promise.all.then.arr (/home/circleci/redactedRepository/node_modules/execa/index.js:277:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: 1,
stdout: '',
stderr: '',
failed: true,
signal: null,
cmd:
'/home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=310',
timedOut: false,
killed: false } +43ms
[12:43:23] Verifying Cypress can run /home/circleci/.cache/Cypress/3.1.5/Cypress [failed]
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: /home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=310
----------
Platform: linux (Debian - 9.6)
Cypress Version: 3.1.5
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Any ideas ? What can I do to push this issue forward towards a resolution ? |
I've went ahead and set up a fresh repository in an effort to replicate this using:
Repository: rdig/react-cypress-circle Turns out this is not a |
@rdig You mentioned that this is not a cypress issue, did you find the root cause of the issue? Could you share? |
Hey in my case the issue reproduces consistently with nvm, cypress doesn't work with nvm on a fresh install. It's pretty easy to reproduce and it's fine to just write somewhere you don't support nvm or fix the path issue and get cypress to run with nvm. nvm is pretty common... |
@benjamingr We're not aware of any issues with
|
We managed to find it just today, so that's why no updates until now. In our docker image we were also installing This required us to set an environment variable for the display: ...
environment:
DISPLAY: :1.0
... This apparently screwed with |
@rdig I have seen unsetting the |
We are running against a similar issue where cypress does not run when an environment variable is set. In our case it is
Running the same command with
|
Thank you @paqman , saved me a lot of time there. How were you able to pin point it to NODE_OPTIONS, is it because of the |
Please try unsetting the To see all environment variables currently setMacOS / Linuxprintenv WindowsSET To unset
|
Also having this problem, however
Weird thing is it was working yesterday afternoon for me, and now today it's just gone totally off the rails. The only thing was turn my mac off last night and back on again this morning, so I haven't installed or done anything else suspect. EDIT: Bit more digging. When I run ~/Library/Caches/.../Cypress binary, I get a node-like REPL.
When my colleague runs it, they get |
Does it work if you unset |
@rdig Doesn't make a difference whether DISPLAY is set to :1.5 or if I EDIT: Looks like sudo makes a difference - and it works! Although I'm not sure why sudo would be necessary, and it would be handy if cypress actually showed which file it was failing to use in it's non-elevated state. |
@jennifer-shehane unsetting EDIT: That worked for the fresh install, first run. I opened another terminal later and tried to run again with |
I was experiencing the same issue on Ubutnu 18.10, but got it working. |
Doing |
@benjamingr were you able to resolve your original issue? Many found success with unsetting NODE_OPTIONS as described here: #3116 (comment) If resolved, please make sure to close the issue. Comment otherwise. |
@jennifer-shehane I was not able to resolve my original issue. Honestly I just stopped using cypress because of it. Not a huge deal since I was looking at it to contribute code at my 20% free time rather than as a tool anyway. I don't mind testing more things (unsetting NODE_OPTIONS did not help, it was one of the first things I've tried and it was not set to begin with). |
Unfortunately we have to close this issue as there is not enough information to reproduce the problem. |
The problem reproduces pretty easily for me and I have offered to provide whatever additional information you might want for about 5 months now. During those 5 months you have continuously said that there is not enough information (rather then tell me what the extra information you want is). If we responded this way in Node.js to a bug report - there would be outrage. I warmly recommend you consider a better approach to potential contributors. That said - whatever works for you - good luck with the project. |
Running Cypress locally on MAC, everything worked. Now I need to integrate it in our CI/CD processes. I'm using Jenkins 2 with Docker container that has CentOS 7 installed. Logs:
Note that: Later edit: |
I've also problems with this topic. I did the unset, but nothing changed! |
I run into similar issue but was able to solve this by: after this cypress run worked just fine. |
On Windows, I had a similar issue. To resolve I have followed below steps:
|
People are still having this issue and I keep getting pings so I'm going to go ahead and unsubscribe. If you change your mind about fixing this or getting a repro you can find my email info at the node.js github repo home page. |
cypress cache clear will resolve most of your issues. |
In order to direct better focus on the overall problem that is being described in several issues - we opened one issue to track this behavior #4624 Please add any information about how we can reproduce this bug there. 🙏 |
Current behavior:
I installed cypress given the npm installation guide using the latest Node.js and npm versions (Node is running under nvm). I got the following error which is guiding me to install dependencies:
Desired behavior:
Cypress should woprk.
Steps to reproduce: (app code and test code)
Versions
Platform: darwin (18.0.0)
Cypress Version: 3.1.4
I can try to investigate and contribute a patch if interested - though I was pretty surprised when such a simple setup failed :/
The text was updated successfully, but these errors were encountered: