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 3.1.1 hangs on Jenkins

See original GitHub issue

When trying to start Cypress on Jenkins inside a cypress docker container it spins forever when verifying, the debug looks like:

["/usr/local/bin/node","/var/jenkins/workspace/.../node_modules/.bin/cypress","run","--project","./..."]
2018-11-21T16:18:09.710Z cypress:cli NODE_OPTIONS is not set
2018-11-21T16:18:09.710Z cypress:cli program parsing arguments
2018-11-21T16:18:09.711Z cypress:cli running Cypress
2018-11-21T16:18:09.744Z cypress:cli parsed cli options { project: './...' }
2018-11-21T16:18:09.746Z cypress:cli verifying Cypress app
2018-11-21T16:18:09.746Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2018-11-21T16:18:09.746Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2018-11-21T16:18:09.746Z cypress:cli using environment variable CYPRESS_CACHE_FOLDER cypress-cache
2018-11-21T16:18:09.746Z cypress:cli checking environment variables
2018-11-21T16:18:09.758Z cypress:cli checking if executable exists /path/to/cache/cypress-cache/3.1.1/Cypress/Cypress
2018-11-21T16:18:09.760Z cypress:cli Binary is executable? : true
2018-11-21T16:18:09.760Z cypress:cli binaryDir is  /path/to/cache/cypress-cache/3.1.1/Cypress
2018-11-21T16:18:09.760Z cypress:cli Reading binary package.json from: /path/to/cache/cypress-cache/3.1.1/Cypress/resources/app/package.json
2018-11-21T16:18:09.762Z cypress:cli Found binary version 3.1.1 installed in: /path/to/cache/cypress-cache/3.1.1/Cypress
2018-11-21T16:18:09.763Z cypress:cli could not read binary_state.json file
2018-11-21T16:18:09.763Z cypress:cli {}
2018-11-21T16:18:09.763Z cypress:cli is Verified ? undefined
2018-11-21T16:18:09.763Z cypress:cli running binary verification check 3.1.1
It looks like this is your first time using Cypress: 3.1.1

[?25l[16:18:09]  Verifying Cypress can run /path/to/cache/cypress-cache/3.1.1/Cypress [started]
2018-11-21T16:18:09.766Z cypress:cli clearing out the verified version
2018-11-21T16:18:09.767Z cypress:cli running smoke test
2018-11-21T16:18:09.767Z cypress:cli using Cypress executable /path/to/cache/cypress-cache/3.1.1/Cypress/Cypress
2018-11-21T16:18:09.767Z cypress:cli needs XVFB? true
2018-11-21T16:18:09.767Z cypress:cli Starting XVFB
2018-11-21T16:18:09.837Z cypress:xvfb _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

2018-11-21T16:18:09.838Z cypress:cli smoke test command: /path/to/cache/cypress-cache/3.1.1/Cypress/Cypress --smoke-test --ping=708

I’ve been through all the workarounds in #819 but with no luck. I’m not sure how to debug this further, any help would be appreciated.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
smartmikecommented, Dec 4, 2018

Thanks @jennifer-shehane – setting ["HOME=${pwd()}/cache", "CYPRESS_CACHE_FOLDER=${pwd()}/cache"] as environment variables got it running, albeit without a cache across builds 😃

2reactions
stickycodecommented, Nov 23, 2018

I can confirm the same behaviour, i’m using 3.1.0 and the jenkins is on kube. Running the same image locally works fine.

+ HOME=/home/node DEBUG=cypress:* /opt/cypress/node_modules/.bin/cypress run
2018-11-23T03:52:12.912Z cypress:cli cli starts with arguments ["/usr/local/bin/node","/opt/cypress/node_modules/.bin/cypress","run"]
2018-11-23T03:52:12.913Z cypress:cli NODE_OPTIONS is not set
2018-11-23T03:52:12.914Z cypress:cli program parsing arguments
2018-11-23T03:52:12.914Z cypress:cli running Cypress
2018-11-23T03:52:12.968Z cypress:cli parsed cli options {}
2018-11-23T03:52:12.969Z cypress:cli verifying Cypress app
2018-11-23T03:52:12.970Z cypress:cli checking environment variables
2018-11-23T03:52:12.990Z cypress:cli checking if executable exists /home/node/.cache/Cypress/3.1.0/Cypress/Cypress
2018-11-23T03:52:12.993Z cypress:cli Binary is executable? : true
2018-11-23T03:52:12.994Z cypress:cli binaryDir is  /home/node/.cache/Cypress/3.1.0/Cypress
2018-11-23T03:52:12.994Z cypress:cli Reading binary package.json from: /home/node/.cache/Cypress/3.1.0/Cypress/resources/app/package.json
2018-11-23T03:52:12.997Z cypress:cli Found binary version 3.1.0 installed in: /home/node/.cache/Cypress/3.1.0/Cypress
2018-11-23T03:52:12.998Z cypress:cli could not read binary_state.json file
2018-11-23T03:52:12.999Z cypress:cli {}
2018-11-23T03:52:12.999Z cypress:cli is Verified ? undefined
2018-11-23T03:52:12.999Z cypress:cli running binary verification check 3.1.0
It looks like this is your first time using Cypress: 3.1.0

[03:52:13]  Verifying Cypress can run /home/node/.cache/Cypress/3.1.0/Cypress [started]
2018-11-23T03:52:13.004Z cypress:cli clearing out the verified version
2018-11-23T03:52:13.005Z cypress:cli running smoke test
2018-11-23T03:52:13.005Z cypress:cli using Cypress executable /home/node/.cache/Cypress/3.1.0/Cypress/Cypress
2018-11-23T03:52:13.005Z cypress:cli needs XVFB? true
2018-11-23T03:52:13.005Z cypress:cli Starting XVFB
2018-11-23T03:52:13.064Z cypress:xvfb _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

2018-11-23T03:52:13.071Z cypress:cli smoke test command: /home/node/.cache/Cypress/3.1.0/Cypress/Cypress --smoke-test --ping=589
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress hangs in Jenkins sometimes - Stack Overflow
It will hang at different spec file, which makes it hard to debug and find why it is failing. Sometimes it will run...
Read more >
Changelog - Cypress Documentation
When a chromium based browser tab or process crashes, Cypress will no longer hang indefinitely but will fail the current test and move...
Read more >
cypress-io/cypress - Gitter
I'm new to CircleCI, and I'm trying to use the Cypress CircleCI Orb. I need to install private NPM packages (using Yarn) in...
Read more >
CI with Jenkins build pipeline for Cypress automation testing
In this video, we will discuss CI with Jenkins build pipeline for Cypress. Jenkins complete video ...
Read more >
Changelog - sorry-cypress
Sorry Cypress changelog. ... build(deps): bump dset from 3.1.1 to 3.1.2 by @dependabot in #577​ ... Prevent crash on GitHub http failure.
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