cypress: Cypress hangs on verify step
Current behavior:
Cypress keeps “Verifying Cypress can run”, so the program hangs
Desired behavior:
Cypress to run normally
How to reproduce:
npm install cypress mocha mocha-multi-reporters mocha-junit-reporter
node_modules/cypress/bin/cypress verify
Additional Info (images, stack traces, etc)
No, are there log files somewhere?
Cypress team update
If you hit problems running Cypress on a specific system:
-
try using newer Cypress version
-
try using newer CI version, or a different CI. See our examples for different CI systems that we run already in cypress-example-kitchensink for examples of systems that work very well
-
try using our official images from cypress-io/cypress-docker-images
-
run Cypress with debug log output. In particular, we would like to see debug output from the CLI module and from our XVFB module. You can turn them both using
DEBUG=cypress:cli,xvfb npx cypress verify -
provide an example for us to reproduce, and please remember that it will be hard for us to install an entire system that matches your system unless you provide Docker file
-
Operating System: CentOS 7.4
-
Cypress Version: 1.0.2
-
Browser Version: N/A
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 12
- Comments: 83 (22 by maintainers)
Same issue
Windows 10 WSL - Ubuntu 18.04.1 LTS (Bionic Beaver) Cypress - ^3.1.5
Steps:
npm inode node_modules/cypress/bin/cypress openResult: never finishes ‘Verifying cypress can run’
I ran into this same problem of Cypress hanging on the verify step.
The call to
util.execis where I observed it hanging:https://github.com/cypress-io/cypress/blob/2333d04a54acfd2d89d9d53cc60a49d46228ceef/cli/lib/tasks/verify.js#L68-L71
If I change that first line to:
So that the child process dumps its stdout and stderr to those of the parent process, it still hangs but I get an informative error message:
Which I was able to use to trace back to the problem (same as @derkoe 's – electron’s default appData path was a read-only directory).
Y’all open to a PR to add this? Doesn’t address the underlying issue of why
cypress --smoke-testseems to be not exiting when this kind of failure happens, but it at least adds visibility so folks can self-serve and fix their specific problem more easily.EDIT would need to adjust things a little so the
thenandcatchcallbacks don’t blow up with the difference when the smoke test does exit – more like “y’all open to something along these lines”We had the same problem - the reason was that “$HOME/.config” was mounted into the container read-only. So the solution was to mount the relevant stuff into another directory and then copy it over before the build.
Would be great when Cypress would not wait/hang when a file cannot be written.
Having same issue on Ubuntu 16.04.5 LTS (WSL on windows 10)
Hello everyone, Im having similar problem on Ubuntu (WSL on windows 10)
Finally found a solution!
My setup is similar to @paulmoliva.
Jenkins declarative pipeline ends up running docker like this:
Turns out that workspace is correct, but inside container home location is
/, and every file write happens to host’s/(Jenkins root).Then in our specific case, electron cannot write to home location, and Cypress’s smoke test crashes in hang.
The solution is to provide an HOME environment variable to docker, then all processes that uses home location reads/writes to the correct path:
I know this can be frustrating, but please try to refrain from making any such witty comments. The Cypress team does not owe us anything. If you aren’t happy with the fact that this isn’t getting anywhere, why don’t you just try to find a fix yourself? OSS needs your contributions, it’s not just a shop for software that is free of charge.
Hi everyone!.
I tried everything I could find on the Internet to solve this issue. Spent 2 days exhausting all the suggested fixes I found. It boiled down to WSL 2, which required me to install a pre-release of Win 10 on my machine after enrolling in the insider program.
This worked for me:
Note: The legacy Ubuntu distro does not work with WSL 2.0. I added Ubuntu 18.04 through the Windows Store during Step 2.
Hey guys, I’m facing the same issue on Ubuntu (WSL on windows 10) when running cypress for a first time. Any ideas? I already installed all cypress required dependencies.
LOG from
DEBUG=cypress:* cypress runI can use other electron apps just fine on WSL1 and X410. WSL2 isn’t officially released yet so I’m not ready to move to it yet, and won’t be deprecated anytime soon. Can this be reopened?
Finally some progress on this ticket 👍
Not sure if same problem but the same happens
One issue I had during installation is that I could not find libsound package and I had to install libsound2
Operating System: Ubuntu 16.04.3 LTS (under windows 10) Cypress Version: 1.0.2
Released in
3.3.0.The code for this is done in cypress-io/cypress#4080, but has yet to be released. We’ll update this issue and reference the changelog when it’s released.
Can this issue then be reopened please?
Got it, we’re running in OpenShift Enterprise which adds a bunch of other problems into the mix.
For anyone else who encounters such issues when trying to run a Centos-7-based image in OpenShift, we ended up finding this plugin for Jenkins, and now we just spin up an image based on the default Cypress images:
The root problem (the permissions thing) just kind of went away when we use the default images. Could have something to do with Centos, idk. We were using Centos because we were basing our image off one which included JNLP, but that does not seem necessary with the plugin.
😄 I was just accidentally @mentioned. No need to include me
No nothing new, it looks like they are ignoring my and others issue. So I’m ignoring Cypress as well and moved to other tools.
Is there any update regarding this problem?
I’m having the same problem running the Docker image. Let me know if I can give valuable info.