question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress hangs on verify step

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:83 (20 by maintainers)

github_iconTop GitHub Comments

8reactions
linuxdropoutcommented, Feb 11, 2019

Same issue

Windows 10 WSL - Ubuntu 18.04.1 LTS (Bionic Beaver) Cypress - ^3.1.5

Steps: npm i node node_modules/cypress/bin/cypress open

Result: never finishes ‘Verifying cypress can run’

7reactions
stuartsancommented, Mar 21, 2019

I ran into this same problem of Cypress hanging on the verify step.

The call to util.exec is 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:

return Promise.resolve(util.exec(cypressExecPath, args, { stdio: 'inherit' })) 

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:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Failed to get 'appData' path
    at Object.<anonymous> (/tmp/lib/resources/electron.asar/browser/init.js:149:39)
    at Object.<anonymous> (/tmp/lib/resources/electron.asar/browser/init.js:173:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:167:16)
    at bootstrap_node.js:589:3

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-test seems 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 then and catch callbacks don’t blow up with the difference when the smoke test does exit – more like “y’all open to something along these lines”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
Open Cypress via cypress open · Go to Developer Tools -> View App Data · This will take you to the directory in...
Read more >
GitLab CI Cypress E2E Hangs on "Verifying Cypress"
The e2e tests hang when verifying cypress and the test never ends. Here is the output of log. Running with gitlab-runner 13.8.0 (775dd39d)...
Read more >
cypress-io/cypress - Gitter
Hi i'm trying to run cypress on a gitlab runner through a pipeline. The runner is backed by docker. The job (a test...
Read more >
How to Debug Cypress Tests : Tutorial | BrowserStack
3. Debug Cypress Tests using console logs · 3. Debug Cypress Tests using console logs · 1. Using Cypress cy.log() · 2. Using...
Read more >
How Guru's Engineers Use Cypress for Better Burn Testing
If the loading state of creating a card hangs around for a millisecond too long and Cypress starts looking for the post-creation state ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found