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:
It looks like this is your first time using Cypress: 3.1.4
โ Verifying Cypress can run /Users/benjamin/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.
----------
/Users/benjamin/Library/Caches/Cypress/3.1.4/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
/Users/benjamin/Library/Caches/Cypress/3.1.4/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=22
----------
Platform: darwin (18.0.0)
Cypress Version: 3.1.4
Cypress should woprk.
benjamin@Benjamins-MacBook-Pro Desktop $ create-react-app cypress-demo
benjamin@Benjamins-MacBook-Pro Desktop $ cd cypress-demo
benjamin@Benjamins-MacBook-Pro cypress-demo (master) $ npm i cypress
benjamin@Benjamins-MacBook-Pro cypress-demo (master) $ npx cypress open
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 :/
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 ๐
cypress open
terminates with no output then I tried npx cypress open
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
1) create new folder anywhere on desktop
2) navigate there in cmd admin mode
3) run npm init
, fill out scripts
4) install cypress with npm install cypress --save-dev
5) add the cypress:run command to the package.json file
6) open cypress in cmd with npm run cypress:open
7) Get the following results:
Can you try clearing your Cypress cache then rerunning the command (suggesting based on https://github.com/cypress-io/cypress/issues/3176, https://github.com/cypress-io/cypress/issues/3212).
cypress cache clear
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 stage: needs information
to stage: awaiting response
although I have provided all that information. To me this indicates I have not been communicating well.
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 bad option: --smoke-test
error printed however here: https://github.com/cypress-io/cypress/issues/3254#issuecomment-459098283 but that has also not gone anywhere.
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 Debian
9.6
)_
I've did the following steps: _(as per this guide)_
~/.cache
node_modules
...
- 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.
ssh
-ed into the machine and try to run it manually: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.
cypress
manually: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.
DEBUG
output)_: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:
spec
)_docker
image as I'm using above)_Repository: rdig/react-cypress-circle
Passing CircleCI jobs: https://circleci.com/gh/rdig/react-cypress-circle
Turns out this is not a cypress
issue after all, so I'm sorry for the false flags.
@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 nvm
and cypress. Out team uses nvm
.
nvm
?nvm
/node
/etc this is failing on?You mentioned that this is not a cypress issue, did you find the root cause of the issue? Could you share?
We managed to find it just today, so that's why no updates until now.
In our docker image we were also installing vnc
to aid in debugging _(we're using chrome
to run tests, not electron
)_
This required us to set an environment variable for the display:
...
environment:
DISPLAY: :1.0
...
This apparently screwed with cypress
somehow, as once we removed that, everything worked just fine.
@rdig I have seen unsetting the DISPLAY
as a solution to other issues on install like here: https://github.com/cypress-io/cypress/issues/1556#issuecomment-418069209 but not everyone, need to narrow down what this issue is.
We are running against a similar issue where cypress does not run when an environment variable is set. In our case it is NODE_OPTIONS
.
```
runner@6bd0fb64c92f:~$ yarn cypress verify
yarn run v1.13.0
warning package.json: No license field
$ /home/runner/node_modules/.bin/cypress verify
It looks like this is your first time using Cypress: 3.1.5
โ Verified Cypress! /home/runner/.cache/Cypress/3.1.5/Cypress
Done in 1.82s.
Running the same command with `NODE_OPTIONS` will break.
runner@6bd0fb64c92f:~$ DEBUG=cypress:* NODE_OPTIONS=--max_old_space_size=4096 yarn cypress verify
yarn run v1.13.0
warning package.json: No license field
$ /home/runner/node_modules/.bin/cypress verify
cypress:cli cli starts with arguments ["/usr/bin/node","/home/runner/node_modules/.bin/cypress","verify"] +0ms
cypress:cli NODE_OPTIONS=--max_old_space_size=4096 +0ms
cypress:cli program parsing arguments +2ms
cypress:cli parsed cli options {} +1ms
cypress:cli verifying Cypress app +0ms
cypress:cli checking environment variables +1ms
cypress:cli checking if executable exists /home/runner/.cache/Cypress/3.1.5/Cypress/Cypress +2ms
cypress:cli Binary is executable? : true +1ms
cypress:cli binaryDir is /home/runner/.cache/Cypress/3.1.5/Cypress +0ms
cypress:cli Reading binary package.json from: /home/runner/.cache/Cypress/3.1.5/Cypress/resources/app/package.json +0ms
cypress:cli Found binary version 3.1.5 installed in: /home/runner/.cache/Cypress/3.1.5/Cypress +2ms
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.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 /home/runner/.cache/Cypress/3.1.5/Cypress/Cypress +0ms
cypress:cli needs XVFB? true +0ms
cypress:cli Starting XVFB +0ms
cypress:xvfb _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
cypress:xvfb +0ms
cypress:cli smoke test command: /home/runner/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=3 +14ms
โ Verifying Cypress can run /home/runner/.cache/Cypress/3.1.5/Cypress
cypress:cli Smoke test failed: { Error: Command failed: /home/runner/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=3
at makeError (/home/runner/node_modules/execa/index.js:172:9)
at Promise.all.then.arr (/home/runner/node_modules/execa/index.js:277:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: null,
stdout: '',
stderr: '',
failed: true,
signal: 'SIGSEGV',
cmd:
'/home/runner/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=3',
timedOut: false,
killed: false } +136ms
โ Verifying Cypress can run /home/runner/.cache/Cypress/3.1.5/Cypress
โ 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
Platform: linux (Ubuntu Linux - 16.04)
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.
```
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 cypress:cli NODE_OPTIONS=--max_old_space_size=4096 +0ms
line?
Please try unsetting the NODE_OPTIONS
environment variable if you have this set - as this causes Cypress to crash. This is due to an Electron bug prior to version 2.0.3, where having NODE_OPTIONS
set causes either a failure or arguments to be ignored. https://github.com/electron/electron/issues/12695#issuecomment-385826834
printenv
SET
NODE_OPTIONS
environment variableunset NODE_OPTIONS # this is not the same as export NODE_OPTIONS=
set NODE_OPTIONS=
We have open issues for this being fixed that you can follow here:
NODE_OPTIONS
should not exit 0
: https://github.com/cypress-io/cypress/issues/1676 - to be released in Cypress 3.3.0Also having this problem, however unset NODE_OPTIONS
isn't fixing it for me. I've unset DISPLAY
(and set it to DISPLAY=:1.5
) and still no luck. Cleared cache, reinstalled node_modules, upgraded to 3.2.0, restarted etc. Still no luck. This is running on my (mac) machine, not on CI or a docker image or anything else.
โฐโ DEBUG=cypress:* ./node_modules/cypress/bin/cypress verify
cypress:cli cli starts with arguments ["/Users/user/.nvm/versions/node/v10.9.0/bin/node","/path/to/file/node_modules/cypress/bin/cypress","verify"] +0ms
cypress:cli NODE_OPTIONS is not set +0ms
cypress:cli program parsing arguments +2ms
cypress:cli parsed cli options {} +2ms
cypress:cli verifying Cypress app +0ms
cypress:cli checking environment variables +1ms
cypress:cli checking if executable exists /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress +3ms
cypress:cli Binary is executable? : true +2ms
cypress:cli binaryDir is /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app +0ms
cypress:cli Reading binary package.json from: /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/Resources/app/package.json +0ms
cypress:cli Found binary version 3.2.0 installed in: /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app +6ms
cypress:cli could not read binary_state.json file +6ms
cypress:cli {} +0ms
cypress:cli is Verified ? undefined +1ms
cypress:cli force verify +0ms
cypress:cli running binary verification check 3.2.0 +0ms
It looks like this is your first time using Cypress: 3.2.0
cypress:cli clearing out the verified version +3ms
cypress:cli running smoke test +1ms
cypress:cli using Cypress executable /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress +0ms
cypress:cli needs XVFB? false +1ms
cypress:cli smoke test command: /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=343 +0ms
cypress:cli Smoke test failed: { Error: Command failed: /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=343
/Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
/Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=343
at makeError (/path/to/file/node_modules/execa/index.js:172:9)
at Promise.all.then.arr (/path/to/file/node_modules/execa/index.js:277:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: 9,
stdout: '',
stderr:
'/Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test\n/Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=343\n',
failed: true,
signal: null,
cmd:
'/Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=343',
timedOut: false,
killed: false } +51ms
โ Verifying Cypress can run /Users/user/Library/Caches/Cypress/3.2.0/Cypress.app
โ Cypress Version: 3.2.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.
----------
/Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress: bad option: --smoke-test
/Users/user/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress: bad option: --ping=343
----------
Platform: darwin (16.7.0)
Cypress Version: 3.2.0
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.
โฐโ ~/Library/Caches/Cypress/3.2.0/Cypress.app/Contents/MacOS/Cypress
> let foo = 'bar'
undefined
> foo
'bar'
>
When my colleague runs it, they get IOVARendererID property not found
, which looks more normal for a cypress run.
@tmharber
Does it work if you unset DISPLAY
and leave it not set? _(Eg: don't set again, in your case to :1.5
)_
@rdig Doesn't make a difference whether DISPLAY is set to :1.5 or if I unset
it before I run it.
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 NODE_OPTIONS
worked for me right away. It was the first solution i tried. Thank you
EDIT: That worked for the fresh install, first run. I opened another terminal later and tried to run again with NODE_OPTIONS
set and it said cypress opened, but nothing actually happened. Once i unset NODE_OPTIONS
again it worked fine.
I was experiencing the same issue on Ubutnu 18.10, but got it working.
I did unset NODE_OPTIONS
, and then npm cypress install
and I was good to go.
Doing unset NODE_OPTIONS
worked for me as well. Thank you @paqman and @jennifer-shehane !
@benjamingr were you able to resolve your original issue? Many found success with unsetting NODE_OPTIONS as described here: https://github.com/cypress-io/cypress/issues/3116#issuecomment-470800618 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:
> [email protected] postinstall /home/ec2-user/workspace/PRIVATE/node_modules/cypress
> node index.js --exec install
Installing Cypress (version: 3.2.0)
[11:03:06] Downloading Cypress [started]
[11:03:07] Downloading Cypress [completed]
[11:03:07] Unzipping Cypress [started]
[11:03:40] Unzipping Cypress [completed]
[11:03:40] Finishing Installation [started]
[11:03:40] Finishing Installation [completed]
You can now open Cypress by running: node_modules/.bin/cypress open
https://on.cypress.io/installing-cypress
added 1841 packages in 48.162s
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Tests)
[Pipeline] sh
[PRIVATE] Running shell script
+ unset NODE_OPTIONS
[Pipeline] sh
[PRIVATE] Running shell script
+ npm run test-e2e-ci -- --env ENVIRONMENT=acceptance-es
> [email protected] test-e2e-ci /home/ec2-user/workspace/PRIVATE
> DEBUG=cypress:* cypress run --record --key CYPRESS_KEY "--env" "ENVIRONMENT=acceptance-es"
2019-05-04T11:03:42.314Z cypress:cli cli starts with arguments ["/root/.nvm/versions/node/v10.13.0/bin/node","/home/ec2-user/workspace/PRIVATE/node_modules/.bin/cypress","run","--record","--key","CYPRESS_KEY","--env","ENVIRONMENT=acceptance-es"]
2019-05-04T11:03:42.316Z cypress:cli NODE_OPTIONS is not set
2019-05-04T11:03:42.316Z cypress:cli program parsing arguments
2019-05-04T11:03:42.317Z cypress:cli running Cypress
2019-05-04T11:03:42.373Z cypress:cli parsed cli options { env: 'ENVIRONMENT=acceptance-es',
record: true,
key: 'CYPRESS_KEY' }
2019-05-04T11:03:42.376Z cypress:cli verifying Cypress app
2019-05-04T11:03:42.377Z cypress:cli checking environment variables
2019-05-04T11:03:42.380Z cypress:cli checking if executable exists /root/.cache/Cypress/3.2.0/Cypress/Cypress
2019-05-04T11:03:42.384Z cypress:cli Binary is executable? : true
2019-05-04T11:03:42.384Z cypress:cli binaryDir is /root/.cache/Cypress/3.2.0/Cypress
2019-05-04T11:03:42.385Z cypress:cli Reading binary package.json from: /root/.cache/Cypress/3.2.0/Cypress/resources/app/package.json
2019-05-04T11:03:42.388Z cypress:cli Found binary version 3.2.0 installed in: /root/.cache/Cypress/3.2.0/Cypress
2019-05-04T11:03:42.389Z cypress:cli could not read binary_state.json file
2019-05-04T11:03:42.389Z cypress:cli {}
2019-05-04T11:03:42.389Z cypress:cli is Verified ? undefined
2019-05-04T11:03:42.389Z cypress:cli running binary verification check 3.2.0
It looks like this is your first time using Cypress: 3.2.0
[11:03:42] Verifying Cypress can run /root/.cache/Cypress/3.2.0/Cypress [started]
2019-05-04T11:03:42.395Z cypress:cli clearing out the verified version
2019-05-04T11:03:42.396Z cypress:cli running smoke test
2019-05-04T11:03:42.396Z cypress:cli using Cypress executable /root/.cache/Cypress/3.2.0/Cypress/Cypress
2019-05-04T11:03:42.396Z cypress:cli needs XVFB? false
2019-05-04T11:03:42.396Z cypress:cli smoke test command: /root/.cache/Cypress/3.2.0/Cypress/Cypress --smoke-test --ping=929
2019-05-04T11:03:42.437Z cypress:cli Smoke test failed: { Error: Command failed: /root/.cache/Cypress/3.2.0/Cypress/Cypress --smoke-test --ping=929
at makeError (/home/ec2-user/workspace/PRIVATE/node_modules/cypress/node_modules/execa/index.js:172:9)
at Promise.all.then.arr (/home/ec2-user/workspace/PRIVATE/node_modules/cypress/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:
'/root/.cache/Cypress/3.2.0/Cypress/Cypress --smoke-test --ping=929',
timedOut: false,
killed: false }
[11:03:42] Verifying Cypress can run /root/.cache/Cypress/3.2.0/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: /root/.cache/Cypress/3.2.0/Cypress/Cypress --smoke-test --ping=929
----------
Platform: linux (Centos - 7.6.1810)
Cypress Version: 3.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test-e2e-ci: `DEBUG=cypress:* cypress run --record --key CYPRESS_KEY "--env" "ENVIRONMENT=acceptance-es"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-e2e-ci 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-05-04T11_03_42_449Z-debug.log
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // ansiColor
[Pipeline] }
Note that:
PRIVATE
is the jenkins job name
PRIVATE_APP
is the project name
CYPRESS_KEY
is the cypress key
All of the above have been updated to remove any private info.
Later edit:
I managed it to have it integrated in my CI pipeline.
Thanks to @euZebe that added comment https://github.com/cypress-io/cypress/issues/2792#issuecomment-443645748
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:
Clearing the cache by running: npx cypress cache clear
And reinstalling cypress by: npx cypress install
after this cypress run worked just fine.
v: 3.3.0
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 https://github.com/cypress-io/cypress/issues/4624 Please add any information about how we can reproduce this bug there. ๐
Most helpful comment
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.