Skip to content
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

Cannot cypress verify - Hangs on Smoke Test on WSL2 #7065

Closed
jamesdalel opened this issue Apr 19, 2020 · 32 comments
Closed

Cannot cypress verify - Hangs on Smoke Test on WSL2 #7065

jamesdalel opened this issue Apr 19, 2020 · 32 comments
Labels
E2E Issue related to end-to-end testing OS: windows prevent-stale mark an issue so it is ignored by stale[bot] Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@jamesdalel
Copy link

jamesdalel commented Apr 19, 2020

Current behavior:

I have just installed version 4.4.0 of cypress and integrated it in to my project. I'm using using WSL Ubuntu and have install the suggested packages in the documentation.

After trying several fixes as well as reverting the version to earlier versions where I'm met with different issues.

After running DEBUG=cypress:* yarn run cypress open it looks like it's getting stuck on the smoke test time out
.

  cypress:cli disabling Electron sandbox +57ms
  cypress:cli running smoke test +1ms
  cypress:cli using Cypress executable /home/<user>/.cache/Cypress/4.4.0/Cypress/Cypress +0ms
  cypress:cli smoke test command: /home/<user>/.cache/Cypress/4.4.0/Cypress/Cypress --no-sandbox --smoke-test --ping=47 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
  ⠼  Verifying Cypress can run /home/<user>/.cache/Cypress/4.4.0/Cypress

Desired behavior:

It should continue to verify and then open Cypress

If anybody could point me in the right direction that would be much appreciated

Versions

Cypress: 4.4.0
Windows 10
Ubuntu 18.04.4 LTS

@Sumedh-k
Copy link

Can you try the steps mentioned in #4624

@jennifer-shehane
Copy link
Member

Can you try clearing the cypress cache via cypress cache clear and reinstalling cypress via cypress install? Can you paste the DEBUG logs during cypress install if they fail again?

@cypress-bot cypress-bot bot added the stage: awaiting response Potential fix was proposed; awaiting response label Apr 20, 2020
@newmankyle
Copy link

I'm also having this problem. I have the same system versions.

cypress cache clear et. al. aren't working for me.
I've verified that all apt-get dependencies are installed.
ldd ...Cypress doesn't seem to be missing anything

some minor observations that might help.

  • I use the .npm-global workaround so that global dependencies are stored in my HOME directory. I install cypress as a devDependency in my project using ~/.npm-global/bin/yarn via yarn add --dev cypress.
  • the browser I've installed is chromium-browser 80, installed via apt install chromium-browser
  • running ~/.cache/Cypress/4.4.1/Cypress/Cypress --smoke-test --ping=101 --no-sandbox initially resulted in an error. I don't have the error anymore, but it was a permissions issue with .cache/.../Cypress/chrome-sandbox -- asking me to chown & chmod.
  • after fixing the chrome-sandbox error, rerunning the ping results in (Cypress:18282): Gtk-WARNING **: 15:41:55.778: cannot open display:
  • my .cache/ is located in ~, and not /root/ as I've noticed in other people's logs.
  • this is for an Angular 9 project

This is my install log. (ngcc is running as an Angular postinstall hook)

➤ yarn add --dev cypress
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.12: The platform "linux" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 53 new dependencies.
info Direct dependencies
└─ cypress@4.4.1
info All dependencies
├─ @cypress/listr-verbose-renderer@0.4.1
├─ @cypress/request@2.88.5
├─ @cypress/xvfb@1.2.4
├─ @samverschueren/stream-to-observable@0.3.0
├─ @types/blob-util@1.3.3
├─ @types/bluebird@3.5.29
├─ @types/chai-jquery@1.1.40
├─ @types/jquery@3.3.31
├─ @types/lodash@4.14.149
├─ @types/mocha@5.2.7
├─ @types/sinon-chai@3.2.3
├─ @types/sinon@7.5.1
├─ @types/sinonjs__fake-timers@6.0.1
├─ any-observable@0.3.0
├─ arch@2.1.1
├─ buffer-crc32@0.2.13
├─ cachedir@2.3.0
├─ check-more-types@2.24.0
├─ cli-cursor@2.1.0
├─ cli-table3@0.5.1
├─ cli-truncate@0.2.1
├─ common-tags@1.8.0
├─ cypress@4.4.1
├─ elegant-spinner@1.0.1
├─ eventemitter2@4.1.2
├─ executable@4.1.1
├─ exit-hook@1.1.1
├─ extract-zip@1.7.0
├─ fd-slicer@1.1.0
├─ getos@3.1.4
├─ global-dirs@0.1.1
├─ indent-string@3.2.0
├─ is-installed-globally@0.1.0
├─ is-observable@1.1.0
├─ lazy-ass@1.6.0
├─ listr-silent-renderer@1.1.1
├─ listr-update-renderer@0.5.0
├─ listr-verbose-renderer@0.5.0
├─ listr@0.14.3
├─ lodash.once@4.1.1
├─ log-update@2.3.0
├─ moment@2.24.0
├─ ospath@1.2.2
├─ pend@1.2.0
├─ pretty-bytes@5.3.0
├─ ramda@0.26.1
├─ request-progress@3.0.0
├─ restore-cursor@2.0.0
├─ slice-ansi@0.0.4
├─ throttleit@1.0.0
├─ tmp@0.1.0
├─ untildify@4.0.0
└─ yauzl@2.10.0
$ ngcc
Compiling @angular/cdk/keycodes : fesm2015 as esm2015
Compiling @angular/animations : fesm2015 as esm2015
Compiling @angular/animations : fesm5 as esm5
...

Let me know if there's any more info needed.

@samuelmartineau
Copy link

I was in a similar case (WSL 1 - Ubuntu 18 - Windows 10 - Cypress 4.4 or 4.5) and migrating to WSL 2 seems to fix the issue

@Bjodol
Copy link

Bjodol commented May 14, 2020

I am having similar problems, it just keeps on hanging on Window 10 - WSL version 1 - This is the debug output:

DEBUG=cypress:* node_modules/.bin/cypress open
  cypress:cli:cli cli starts with arguments ["/usr/bin/node","/home/bjodol/Code/ClientApp/node_modules/.bin/cypress","open"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +2ms
  cypress:cli:cli opening Cypress +1ms
  cypress:cli parsed cli options {} +155ms
  cypress:cli opening from options {"project":"/home/bjodol/Code/ClientApp"} +0ms
  cypress:cli command line arguments ["--project","/home/bjodol/Code/ClientApp"] +0ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +0ms
  cypress:cli checking if executable exists /home/bjodol/.cache/Cypress/4.5.0/Cypress/Cypress +3ms
  cypress:cli Binary is executable? : true +3ms
  cypress:cli binaryDir is  /home/bjodol/.cache/Cypress/4.5.0/Cypress +0ms
  cypress:cli Reading binary package.json from: /home/bjodol/.cache/Cypress/4.5.0/Cypress/resources/app/package.json +0ms
  cypress:cli Found binary version 4.5.0 installed in: /home/bjodol/.cache/Cypress/4.5.0/Cypress +3ms
  cypress:cli could not read binary_state.json file at "/home/bjodol/.cache/Cypress/4.5.0/binary_state.json" +3ms
  cypress:cli {} +1ms
  cypress:cli is Verified ? undefined +2ms
  cypress:cli running binary verification check 4.5.0 +1ms
It looks like this is your first time using Cypress: 4.5.0

  cypress:cli clearing out the verified version +3ms
  cypress:cli undefined DISPLAY environment variable +0ms
  cypress:cli Cypress will spawn its own Xvfb +0ms
  cypress:cli needs Xvfb? true +9ms
  cypress:cli Starting Xvfb +1ms
  cypress:cli disabling Electron sandbox +42ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /home/bjodol/.cache/Cypress/4.5.0/Cypress/Cypress +1ms
  cypress:cli smoke test command: /home/bjodol/.cache/Cypress/4.5.0/Cypress/Cypress --no-sandbox --smoke-test --ping=822 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
  ⠇  Verifying Cypress can run /home/bjodol/.cache/Cypress/4.5.0/Cypress

@vintprox
Copy link

vintprox commented May 18, 2020

Having literally same troubles. My log output is mostly similar to the one from previous respondent:

$ DEBUG=cypress:* npx cypress verify
  cypress:cli:cli cli starts with arguments ["/usr/bin/node","/home/vintprox/vuephab/node_modules/.bin/cypress","verify"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +4ms
  cypress:cli parsed cli options {} +2ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +1ms
  cypress:cli checking if executable exists /home/vintprox/.cache/Cypress/4.5.0/Cypress/Cypress +2ms
  cypress:cli Binary is executable? : true +2ms
  cypress:cli binaryDir is  /home/vintprox/.cache/Cypress/4.5.0/Cypress +0ms
  cypress:cli Reading binary package.json from: /home/vintprox/.cache/Cypress/4.5.0/Cypress/resources/app/package.json +0ms
  cypress:cli Found binary version 4.5.0 installed in: /home/vintprox/.cache/Cypress/4.5.0/Cypress +4ms
  cypress:cli could not read binary_state.json file at "/home/vintprox/.cache/Cypress/4.5.0/binary_state.json" +4ms
  cypress:cli {} +1ms
  cypress:cli is Verified ? undefined +2ms
  cypress:cli force verify +1ms
  cypress:cli running binary verification check 4.5.0 +0ms

  cypress:cli clearing out the verified version +3ms
  cypress:cli DISPLAY environment variable is set to localhost:0.0 on Linux
  cypress:cli Assuming this DISPLAY points at working X11 server,
  cypress:cli Cypress will not spawn own Xvfb
  cypress:cli
  cypress:cli NOTE: if the X11 server is NOT working, Cypress will exit without explanation,
  cypress:cli   see https://github.com/cypress-io/cypress/issues/4034
  cypress:cli Solution: Unset the DISPLAY variable and try again:
  cypress:cli   DISPLAY= npx cypress run ... +0ms
  cypress:cli needs Xvfb? false +9ms
  cypress:cli spawning, should retry on display problem? true +0ms
  cypress:cli disabling Electron sandbox +1ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /home/vintprox/.cache/Cypress/4.5.0/Cypress/Cypress +0ms
  cypress:cli smoke test command: /home/vintprox/.cache/Cypress/4.5.0/Cypress/Cypress --no-sandbox --smoke-test --ping=745 +1ms
  cypress:cli smoke test timeout 30000 ms +4ms
  ⠼  Verifying Cypress can run /home/vintprox/.cache/Cypress/4.5.0/Cypress

Software Used

Windows Linux Subsystem - Ubuntu 20.04 after upgrade
Cypress 4.5.0
VcXsrv X Server 1.20.8.1 (on Windows 10.0.17763 build 17763)

As you may guess, it's WSL 1, but my hardware seems to be refusing to upgrade, so I'm unable to solve Cypress issue with WSL 2.

History

Here's very long ticket about cypress verify hanging: #819. It's now closed because two pull requests appeared that committed to the "resolution": #3807 and #4080. While author of #3807 recommends to show more detailed debug output and presents a solution, it's being closed/rejected in favor of #4080 which seems to add timeout trigger for killing verify process.

But I don't see its action in Cypress 4.5.0. I wonder if #3807 actually commits to better log output of cypress, and it's just being overlooked. Mangling permissions on ~/config doesn't solve my problem. Trying any of npx cypress cache clear && npx cypress install doesn't seem to defy this, too.

Before, all dependencies were installed without problem on Ubuntu, WSL bash rerun:

sudo apt install libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

Both cypress open and cypress run (prepending DEBUG=cypress:* doesn't add to log output's value) freeze on Verifying Cypress can run step, and I cannot use Cypress!

Giving second thought, maybe WSL isn't viable for running any tests. How one can be sure that result will be the same when this black box receives changes? xD

@nickbreid
Copy link

I have the same setup as @vintprox -- except Cypress 4.6 -- and I've tried all the suggested fixes with no luck. My debug output looks the same as his.

@Nanstop
Copy link

Nanstop commented May 26, 2020

Same here with 4.6.0 on Jeninks CI pipeline. I saw on another thread installing WSL can solve the issue but there is no way it is the ONLY solution. The longer this remains unsolved more people will move on to other e2e candidates.

@Nanstop
Copy link

Nanstop commented May 26, 2020

OK, so I was able to solve the issue after 3 days of effort. I would suggest anyone to start with the Debug turned on and even with a -verbose flag when running cypress verify and cypress run. In my case the log indicates cypress cli smoke test timed out due to cypress wants root access. And after going through this issue: #2821 (comment) I was able to get it working on my linux server. Hope this helps others, I am just a js developer and if I can figure this out, you can too.

@newmankyle
Copy link

Unfortunately still haven't made progress. I've tried reading #2821 (and other referenced sources) as @Nanstop suggested, but nothing's changed
Today I've tried:

  • updating to Cypress 4.6
  • setting CYPRESS_CACHE_FOLDER=~/.cache (including reinstalling with the env var on)
  • playing around with the DISPLAY variable (I get GTK errors)
  • playing around with the HOME variable
  • addressing the Owner of /tmp/.X11-unix should be set to root problem sudo chown -R root ./.X11-unix

This is my debug output now:

➤ env CYPRESS_CACHE_FOLDER='/home/<user>/.cache' DEBUG='cypress:*' HOME='/home/<user>' npx cypress run --headless
  cypress:cli:cli cli starts with arguments ["/usr/local/bin/node","/home/<user>/workspace/<path-to-project>/app/node_modules/.bin/cypress","run","--headless"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +3ms
  cypress:cli:cli running Cypress with args [ Command { commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], _execs: Set {}, _allowUnknownOption: false, _args: [], _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _noHelp: false, _exitCallback: undefined, _executableFile: undefined, parent: Command { commands: [Array], options: [Array], _execs: Set {}, _allowUnknownOption: false, _args: [], _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _usage: '<command> [options]', _events: [Object: null prototype], _eventsCount: 9, rawArgs: [Array], args: [] }, _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 19, exit: true, headless: true } ] +1ms
  cypress:cli:cli variable-length opts parsed { args: [ '/usr/local/bin/node', '/home/<user>/<path-to-project>/app/node_modules/.bin/cypress', 'run', '--headless' ], opts: Command { commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], _execs: Set {}, _allowUnknownOption: false, _args: [], _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _noHelp: false, _exitCallback: undefined, _executableFile: undefined, parent: Command { commands: [Array], options: [Array], _execs: Set {}, _allowUnknownOption: false, _args: [], _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _usage: '<command> [options]', _events: [Object: null prototype], _eventsCount: 9, rawArgs: [Array], args: [] }, _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 19, exit: true, headless: true } } +101ms
  cypress:cli parsed cli options { headless: true } +108ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable +1ms
  cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable +0ms
  cypress:cli using environment variable CYPRESS_CACHE_FOLDER /home/<user>/.cache +0ms
  cypress:cli checking environment variables +2ms
  cypress:cli checking if executable exists /home/<user>/.cache/4.6.0/Cypress/Cypress +3ms
  cypress:cli Binary is executable? : true +2ms
  cypress:cli binaryDir is  /home/<user>/.cache/4.6.0/Cypress +0ms
  cypress:cli Reading binary package.json from: /home/<user>/.cache/4.6.0/Cypress/resources/app/package.json +6ms
  cypress:cli Found binary version 4.6.0 installed in: /home/<user>/.cache/4.6.0/Cypress +3ms
  cypress:cli could not read binary_state.json file at "/home/<user>/.cache/4.6.0/binary_state.json" +3ms
  cypress:cli {} +1ms
  cypress:cli is Verified ? undefined +2ms
  cypress:cli running binary verification check 4.6.0 +1ms
It looks like this is your first time using Cypress: 4.6.0

  cypress:cli clearing out the verified version +4ms
  cypress:cli undefined DISPLAY environment variable +0ms
  cypress:cli Cypress will spawn its own Xvfb +0ms
  cypress:cli needs Xvfb? true +7ms
  cypress:cli Starting Xvfb +1ms
  cypress:cli disabling Electron sandbox +38ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /home/<user>/.cache/4.6.0/Cypress/Cypress +1ms
  cypress:cli smoke test command: /home/<user>/.cache/4.6.0/Cypress/Cypress --no-sandbox --smoke-test --ping=970 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
  ⠇  Verifying Cypress can run /home/<user>/.cache/4.6.0/Cypress

@Nanstop , could you maybe clarify fixed the problem for you? What was cypress trying to access as root?

@timharsch
Copy link

timharsch commented May 29, 2020

I had the issue of smoke test hanging as well when running a container on cypress/base, and using it to 'yarn install', './node_modules/cypress/bin/cypress install', 'cypress run'
After reading the comment #2821 and working through the yarn write access issues I came up with the following:

FROM cypress/base:12.16.2

RUN mkdir /.yarn
RUN chmod 777 /.yarn
RUN touch /.yarnrc    
RUN chmod 777 /.yarnrc
RUN mkdir -p /.cache/yarn
RUN chmod 777 /.cache/yarn

ENV HOME=/tmp

Adding the ENV is what abated the hang on smoke test for me.

@hatboyzero
Copy link

I am seeing the same behavior with 4.7.0. Hangs on smoketest and never completes.

@JochenDiekenbrock
Copy link

JochenDiekenbrock commented Jun 24, 2020

I'm seeing the same behaviour with 4.8.0 on Jenkins. Jenkins starts a docker image based on cypress/browsers. Cypress runs fine locally in this image, but hangs on Jenkins.

Dockerfile:

FROM cypress/browsers:node13.8.0-chrome81-ff75
RUN npm i -g lerna@3.16.4
RUN npm config set registry https://....

RUN mkdir /tmp/.X11-unix
RUN chmod 1777 /tmp/.X11-unix
RUN chown root /tmp/.X11-unix/

ENV HOME=/tmp

Debug output on Jenkins:

2020-06-24T06:27:53.927Z cypress:cli:cli cli starts with arguments ["/usr/local/bin/node","/home/jenkins/workspace/feature_run-e2e-tests-on-jenkins/apps/booking-e2e-tests/node_modules/.bin/cypress","run"]
2020-06-24T06:27:53.927Z cypress:cli NODE_OPTIONS is not set
2020-06-24T06:27:53.928Z cypress:cli:cli program parsing arguments
2020-06-24T06:27:53.930Z cypress:cli:cli running Cypress with args [ Command { commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _noHelp: false, _exitCallback: undefined, _executableFile: undefined, parent: Command { commands: [Array], options: [Array], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _usage: '<command> [options]', _events: [Object: null prototype], _eventsCount: 9, rawArgs: [Array], args: [] }, _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 19, exit: true } ]
2020-06-24T06:27:53.989Z cypress:cli:cli variable-length opts parsed { args: [ '/usr/local/bin/node', '/home/jenkins/workspace/feature_run-e2e-tests-on-jenkins/apps/booking-e2e-tests/node_modules/.bin/cypress', 'run' ], opts: Command { commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _noHelp: false, _exitCallback: undefined, _executableFile: undefined, parent: Command { commands: [Array], options: [Array], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _usage: '<command> [options]', _events: [Object: null prototype], _eventsCount: 9, rawArgs: [Array], args: [] }, _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 19, exit: true } }
2020-06-24T06:27:53.990Z cypress:cli parsed cli options {}
2020-06-24T06:27:53.990Z cypress:cli verifying Cypress app
2020-06-24T06:27:53.991Z cypress:cli checking environment variables
2020-06-24T06:27:53.993Z cypress:cli checking if executable exists .cache/Cypress/4.8.0/Cypress/Cypress
2020-06-24T06:27:53.993Z cypress:cli Binary is executable? : true
2020-06-24T06:27:53.994Z cypress:cli binaryDir is  .cache/Cypress/4.8.0/Cypress
2020-06-24T06:27:53.994Z cypress:cli Reading binary package.json from: .cache/Cypress/4.8.0/Cypress/resources/app/package.json
2020-06-24T06:27:53.995Z cypress:cli Found binary version 4.8.0 installed in: .cache/Cypress/4.8.0/Cypress
2020-06-24T06:27:53.996Z cypress:cli could not read binary_state.json file at ".cache/Cypress/4.8.0/binary_state.json"
2020-06-24T06:27:53.996Z cypress:cli {}
2020-06-24T06:27:53.996Z cypress:cli is Verified ? undefined
2020-06-24T06:27:53.996Z cypress:cli running binary verification check 4.8.0
�[?25l[06:27:53]  Verifying Cypress can run .cache/Cypress/4.8.0/Cypress [started]
2020-06-24T06:27:53.999Z cypress:cli clearing out the verified version
2020-06-24T06:27:54.003Z cypress:cli undefined DISPLAY environment variable
2020-06-24T06:27:54.003Z cypress:cli Cypress will spawn its own Xvfb
2020-06-24T06:27:54.003Z cypress:cli needs Xvfb? true
2020-06-24T06:27:54.003Z cypress:cli Starting Xvfb
2020-06-24T06:27:54.019Z cypress:cli disabling Electron sandbox
2020-06-24T06:27:54.019Z cypress:cli running smoke test
2020-06-24T06:27:54.019Z cypress:cli using Cypress executable .cache/Cypress/4.8.0/Cypress/Cypress
2020-06-24T06:27:54.019Z cypress:cli smoke test command: .cache/Cypress/4.8.0/Cypress/Cypress --no-sandbox --smoke-test --ping=991
2020-06-24T06:27:54.019Z cypress:cli smoke test timeout 30000 ms

Debug output in Docker running locally (on Kubuntu):

2020-06-24T07:36:41.716Z cypress:cli:cli cli starts with arguments ["/usr/local/bin/node","/e2e/apps/booking-e2e-tests/node_modules/.bin/cypress","run"]
2020-06-24T07:36:41.717Z cypress:cli NODE_OPTIONS is not set
2020-06-24T07:36:41.718Z cypress:cli:cli program parsing arguments
2020-06-24T07:36:41.721Z cypress:cli:cli running Cypress with args [ Command { commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _noHelp: false, _exitCallback: undefined, _executableFile: undefined, parent: Command { commands: [Array], options: [Array], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _usage: '<command> [options]', _events: [Object: null prototype], _eventsCount: 9, rawArgs: [Array], args: [] }, _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 19, exit: true } ]
2020-06-24T07:36:41.794Z cypress:cli:cli variable-length opts parsed { args: [ '/usr/local/bin/node', '/e2e/apps/booking-e2e-tests/node_modules/.bin/cypress', 'run' ], opts: Command { commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _noHelp: false, _exitCallback: undefined, _executableFile: undefined, parent: Command { commands: [Array], options: [Array], _execs: Set(0) {}, _allowUnknownOption: false, _args: [], _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _helpFlags: '-h, --help', _helpDescription: 'output usage information', _helpShortFlag: '-h', _helpLongFlag: '--help', _usage: '<command> [options]', _events: [Object: null prototype], _eventsCount: 9, rawArgs: [Array], args: [] }, _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, _events: [Object: null prototype] { 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 19, exit: true } }
2020-06-24T07:36:41.798Z cypress:cli parsed cli options {}
2020-06-24T07:36:41.798Z cypress:cli verifying Cypress app
2020-06-24T07:36:41.799Z cypress:cli checking environment variables
2020-06-24T07:36:41.801Z cypress:cli checking if executable exists /home/node/.cache/Cypress/4.8.0/Cypress/Cypress
2020-06-24T07:36:41.803Z cypress:cli Binary is executable? : true
2020-06-24T07:36:41.803Z cypress:cli binaryDir is  /home/node/.cache/Cypress/4.8.0/Cypress
2020-06-24T07:36:41.803Z cypress:cli Reading binary package.json from: /home/node/.cache/Cypress/4.8.0/Cypress/resources/app/package.json
2020-06-24T07:36:41.809Z cypress:cli Found binary version 4.8.0 installed in: /home/node/.cache/Cypress/4.8.0/Cypress
2020-06-24T07:36:41.810Z cypress:cli could not read binary_state.json file at "/home/node/.cache/Cypress/4.8.0/binary_state.json"
2020-06-24T07:36:41.810Z cypress:cli {}
2020-06-24T07:36:41.811Z cypress:cli is Verified ? undefined
2020-06-24T07:36:41.811Z cypress:cli running binary verification check 4.8.0
[07:36:41]  Verifying Cypress can run /home/node/.cache/Cypress/4.8.0/Cypress [started]
2020-06-24T07:36:41.815Z cypress:cli clearing out the verified version
2020-06-24T07:36:41.820Z cypress:cli undefined DISPLAY environment variable
2020-06-24T07:36:41.820Z cypress:cli Cypress will spawn its own Xvfb
2020-06-24T07:36:41.821Z cypress:cli needs Xvfb? true
2020-06-24T07:36:41.821Z cypress:cli Starting Xvfb
2020-06-24T07:36:41.840Z cypress:cli disabling Electron sandbox
2020-06-24T07:36:41.840Z cypress:cli running smoke test
2020-06-24T07:36:41.840Z cypress:cli using Cypress executable /home/node/.cache/Cypress/4.8.0/Cypress/Cypress
2020-06-24T07:36:41.840Z cypress:cli smoke test command: /home/node/.cache/Cypress/4.8.0/Cypress/Cypress --no-sandbox --smoke-test --ping=285
2020-06-24T07:36:41.840Z cypress:cli smoke test timeout 30000 ms
2020-06-24T07:36:44.375Z cypress:cli smoke test stdout "It looks like you are running the Cypress binary directly.

This is not the recommended approach, and Cypress may not work correctly.

Please install the 'cypress' NPM package and follow the instructions here:

https://on.cypress.io/installing-cypress
285"
2020-06-24T07:36:44.375Z cypress:cli Stopping Xvfb
2020-06-24T07:36:44.428Z cypress:cli write verified: true
2020-06-24T07:36:44.429Z cypress:cli could not read binary_state.json file at "/home/node/.cache/Cypress/4.8.0/binary_state.json"
[07:36:44]  Verified Cypress!       /home/node/.cache/Cypress/4.8.0/Cypress [title changed]
[07:36:44]  Verified Cypress!       /home/node/.cache/Cypress/4.8.0/Cypress [completed]

ldd output:

ldd .cache/Cypress/4.8.0/Cypress/Cypress

linux-vdso.so.1 (0x00007ffd5d1d1000)
libffmpeg.so => /home/jenkins/workspace/feature_run-e2e-tests-on-jenkins/apps/booking-e2e-tests/.cache/Cypress/4.8.0/Cypress/libffmpeg.so (0x00007f04b2d7a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f04b2d67000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f04b2d46000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f04b2d3c000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f04b2ce7000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f04b2bc6000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f04b2a08000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f04b28c7000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f04b28c2000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f04b2898000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f04b2695000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f04b2686000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f04b2681000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f04b246f000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f04b2269000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f04b2059000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f04b1e4f000)
libXtst.so.6 => /usr/lib/x86_64-linux-gnu/libXtst.so.6 (0x00007f04b1c47000)
libnss3.so => /usr/lib/x86_64-linux-gnu/libnss3.so (0x00007f04b1af9000)
libnssutil3.so => /usr/lib/x86_64-linux-gnu/libnssutil3.so (0x00007f04b1ac7000)
libsmime3.so => /usr/lib/x86_64-linux-gnu/libsmime3.so (0x00007f04b1a98000)
libnspr4.so => /usr/lib/x86_64-linux-gnu/libnspr4.so (0x00007f04b1a57000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f04b1a04000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f04b19dc000)
libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f04b12eb000)
libgdk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007f04b11ef000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f04b11df000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f04b1194000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f04b116b000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f04b1049000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f04b0ec6000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f04b0e89000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f04b0c7e000)
libXss.so.1 => /usr/lib/x86_64-linux-gnu/libXss.so.1 (0x00007f04b0c79000)
libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007f04b0b78000)
libatk-bridge-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007f04b0b41000)
libatspi.so.0 => /usr/lib/x86_64-linux-gnu/libatspi.so.0 (0x00007f04b0b0d000)
libcups.so.2 => /usr/lib/x86_64-linux-gnu/libcups.so.2 (0x00007f04b0a7a000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f04b0a60000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f04b089f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f04ba355000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f04b0895000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f04b081f000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f04b0819000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f04b05fb000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007f04b059c000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f04b0374000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f04b035a000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f04b0154000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f04aff4e000)
libplc4.so => /usr/lib/x86_64-linux-gnu/libplc4.so (0x00007f04aff47000)
libplds4.so => /usr/lib/x86_64-linux-gnu/libplds4.so (0x00007f04aff42000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f04afea1000)
libcairo-gobject.so.2 => /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007f04afe93000)
libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f04afe51000)
libwayland-cursor.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007f04afe47000)
libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f04afe42000)
libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f04afe31000)
libepoxy.so.0 => /usr/lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007f04afcff000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f04afc02000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f04afbe9000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f04afba3000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f04afae7000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f04afae2000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007f04afad5000)
libfribidi.so.0 => /usr/lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007f04afab8000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f04afa12000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f04af9d9000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f04af9d4000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f04af9c5000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f04af976000)
libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f04af7ca000)
libavahi-common.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007f04af7bc000)
libavahi-client.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007f04af7a9000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f04af754000)
libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f04af738000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f04af710000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f04af6f1000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f04af5d3000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f04af5a6000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f04af59b000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f04af591000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f04af4b1000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f04af47d000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f04af477000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f04af466000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f04af45f000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f04af330000)
libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f04af311000)
libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f04af18d000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f04aef7a000)
libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f04aef40000)
libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f04aef07000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f04aee84000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f04aee61000)

@anilshrish
Copy link

Same here. Cypress runs fine locally in this image, but hangs on Jenkins.

@cypress-bot cypress-bot bot added stage: needs investigating Someone from Cypress needs to look at this and removed stage: awaiting response Potential fix was proposed; awaiting response labels Jul 2, 2020
@JochenDiekenbrock
Copy link

After a lot of debugging, I found the solution, which is actually quite simple. Jenkins runs docker with a user mapping -u 996:994
This user does not exist in the docker image. When docker starts, HOME of this user is set to / where the user does not have write access.

With HOME set to /tmp, everything now works fine.

Perhaps adding a check to cypress whether HOME is writable would be helpful?

@georgewilde
Copy link

georgewilde commented Jul 3, 2020

@JochenDiekenbrock I'm glad you've found "a" solution but I don't think it's "the" solution as you're using Docker and the original issue raised relates to WSL on Windows, not Docker.

I just want to ensure that someone doesn't close this issue thinking we have a solution as there is still no current solution or workaround that fixes the original description.

I can confirm that I am using WSL (not WSL2) on Windows and am still experiencing this issue. The output from running DEBUG=cypress:* cypress verify is:

  cypress:cli:cli cli starts with arguments ["/home/username/.nvm/versions/node/v13.10.1/bin/node","/mnt/c/Users/username/projects/learning/cypress/node_modules/.bin/cypress","verify"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +2ms
  cypress:cli parsed cli options {} +3ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +1ms
  cypress:cli checking if executable exists /home/username/.cache/Cypress/4.9.0/Cypress/Cypress +3ms
  cypress:cli Binary is executable? : true +3ms
  cypress:cli binaryDir is  /home/username/.cache/Cypress/4.9.0/Cypress +0ms
  cypress:cli Reading binary package.json from: /home/username/.cache/Cypress/4.9.0/Cypress/resources/app/package.json +0ms
  cypress:cli Found binary version 4.9.0 installed in: /home/username/.cache/Cypress/4.9.0/Cypress +3ms
  cypress:cli could not read binary_state.json file at "/home/username/.cache/Cypress/4.9.0/binary_state.json" +3ms
  cypress:cli {} +1ms
  cypress:cli is Verified ? undefined +2ms
  cypress:cli force verify +0ms
  cypress:cli running binary verification check 4.9.0 +1ms

  cypress:cli clearing out the verified version +4ms
  cypress:cli undefined DISPLAY environment variable +0ms
  cypress:cli Cypress will spawn its own Xvfb +0ms
  cypress:cli needs Xvfb? true +11ms
  cypress:cli Starting Xvfb +2ms
  cypress:xvfb _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
  cypress:xvfb  +0ms
  cypress:cli disabling Electron sandbox +43ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /home/username/.cache/Cypress/4.9.0/Cypress/Cypress +0ms
  cypress:cli smoke test command: /home/username/.cache/Cypress/4.9.0/Cypress/Cypress --no-sandbox --smoke-test --ping=153 +1ms
  cypress:cli smoke test timeout 30000 ms +0ms
  ⠸  Verifying Cypress can run /home/username/.cache/Cypress/4.9.0/Cypress

The command never completes and there is no further output.

I have tried the steps outlined in #4624 and am using the latest version of Cypress, currently 4.9.0.
I don't have the option of moving to WSL2 or using Docker.

@amkoehler
Copy link

@timharsch your solution worked for me on WSL2. I had a DISPLAY env variable set for VcXsrv, and after running unset DISPLAY the verification step completed w/o issues.

@RyanPnayR
Copy link

I'm having this issue now on a second account I have on my windows machine. I have wsl 2 set up just fine on my main account. On the second account I'm now having this issue. I tried replicating the steps I followed to set up on my main account, I'm now stuck with this error.

@RyanPnayR
Copy link

So I went back and deleted my current wsl instance and started from scratch. I followed this guide then this one and I got it to work. My only additional note is he didn't have all the dependencies listed for cypress in the guide but you can find them here.

@jennifer-shehane jennifer-shehane changed the title Can't Verify Cypress 4.4.0 - Hangs on Smoke Test Cannot cypress verify - Hangs on Smoke Test on WSL2 Jul 30, 2020
@adirksen
Copy link

Using cypress 5.1.0 on Windows 10 Azure VM on latest ubuntu wsl1 instance.
Have the same issue/logs as @georgewilde and others.
Upgrade to wsl2 is not an option as it requires nested-virtualization ability and our SKU Family for dev machines does not support this as of yet.
Other x-applications run without a hitch yet Cypress hangs on verification.

@derhecht
Copy link

derhecht commented Oct 9, 2020

After a lot of debugging, I found the solution, which is actually quite simple. Jenkins runs docker with a user mapping -u 996:994
This user does not exist in the docker image. When docker starts, HOME of this user is set to / where the user does not have write access.

With HOME set to /tmp, everything now works fine.

Perhaps adding a check to cypress whether HOME is writable would be helpful?

weird as is does not work with HOME=. or something - may be have to be absolute

@Nhaaro
Copy link

Nhaaro commented Feb 8, 2021

Same here, Main Ubuntu disto in store no LTS | cypress 6.4 | WSL1 | Windows 10 Enterprise v.2004
Here's the output of DEBUG=cypress:* npx cypress verify

❯ DEBUG=cypress:* npx cypress verify
  cypress:cli:cli cli starts with arguments ["/usr/bin/node","/home/alanlaredo/Dev/A-DealerUI/node_modules/.bin/cypress","verify"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +3ms
  cypress:cli parsed cli options {} +3ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +1ms
  cypress:cli checking if executable exists /home/alanlaredo/.cache/Cypress/5.6.0/Cypress/Cypress +3ms
  cypress:cli Binary is executable? : true +2ms
  cypress:cli binaryDir is  /home/alanlaredo/.cache/Cypress/5.6.0/Cypress +0ms
  cypress:cli Reading binary package.json from: /home/alanlaredo/.cache/Cypress/5.6.0/Cypress/resources/app/package.json +0ms
  cypress:cli Found binary version 5.6.0 installed in: /home/alanlaredo/.cache/Cypress/5.6.0/Cypress +9ms
  cypress:cli could not read binary_state.json file at "/home/alanlaredo/.cache/Cypress/5.6.0/binary_state.json" +9ms
  cypress:cli {} +1ms
  cypress:cli is Verified ? undefined +2ms
  cypress:cli force verify +0ms
  cypress:cli running binary verification check 5.6.0 +1ms

  cypress:cli clearing out the verified version +2ms
  cypress:cli undefined DISPLAY environment variable +0ms
  cypress:cli Cypress will spawn its own Xvfb +0ms
  cypress:cli needs Xvfb? true +5ms
  cypress:cli Starting Xvfb +1ms
  cypress:xvfb _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
  cypress:xvfb  +0ms
  cypress:cli disabling Electron sandbox +48ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /home/alanlaredo/.cache/Cypress/5.6.0/Cypress/Cypress +1ms
  cypress:cli smoke test command: /home/alanlaredo/.cache/Cypress/5.6.0/Cypress/Cypress --no-sandbox --smoke-test --ping=702 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
  ⠙  Verifying Cypress can run /home/alanlaredo/.cache/Cypress/5.6.0/Cypress

I'm planning on switching to WSL2 once its networking issues are resolved

@Ex4l
Copy link

Ex4l commented Jul 30, 2021

Same here in WSL2 Ubuntu 20.04 LTS and Cypress 8.0.0

if DISPLAY env variable is set it fails but unsetting the variable by doing so is making it work :

unset DISPLAY

@JosephKan3
Copy link

Same here in WSL2 Ubuntu 20.04 LTS and Cypress 8.0.0

if DISPLAY env variable is set it fails but unsetting the variable by doing so is making it work :

unset DISPLAY

Yeah, but the problem is that if you unset DISPLAY, you're preventing Cypress from launching the GUI since it has no display to connect to.

@cypress-bot cypress-bot bot added stage: backlog and removed stage: needs investigating Someone from Cypress needs to look at this labels Apr 28, 2022
@nagash77 nagash77 added the prevent-stale mark an issue so it is ignored by stale[bot] label Apr 3, 2023
@matheuspellegrini
Copy link

I've faced this same issue and after a long research I've identified that my problem is related to webpack build, so I've tried to build(npm run build) and my webpack run out of memory(WSL), I've 32GB of RAM and this still happends, so I just run this export NODE_OPTIONS=--max_old_space_size=8192 and cypress work again, took me some months to discover this as cypress doesn't stop or show errors related to webpack build(just when succeed). Hope I can help you(I've never found that related solution).

@MikeMcC399
Copy link
Contributor

@matheuspellegrini

It sounds like you are describing a different problem, as the original issue was about cypress verify only.

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jul 4, 2023

Does this issue need to stay open?

There have been some major enhancements to WSL2 through Windows Subsystem for Linux GUI (WSLg) which provides a GUI environment for WSL2 out-of-the-box.

I have not seen this problem occurring on Windows 11. The only issue I had was to build Cypress itself on a laptop I use when I'm traveling which only has 8GB memory. I added

[wsl2]
memory=5GB

to %HOMEPATH%\.wslconfig and yarn dev for Cypress worked.

So the following sequence used on a local clone of https://github.com/cypress-io/cypress ran successfully

yarn
yarn dev
npm start --prefix ../cypress-example-kitchensink & yarn cypress:run --project ../cypress-example-kitchensink

This implicitly includes the smoke test.

Environment

Windows 11 
Cypress 12.16.0 (directly from develop branch on https://github.com/cypress-io/cypress)
Node.js 16.16.0
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1928
WSL2 running Ubuntu 22.04.2 LTS (jammy)

@JosephKan3
Copy link

Does this issue need to stay open?

There have been some major enhancements to WSL2 through Windows Subsystem for Linux GUI (WSLg) which provides a GUI environment for WSL2 out-of-the-box.

I have not seen this problem occurring on Windows 11. The only issue I had was to build Cypress itself on a laptop I use when I'm traveling which only has 8GB memory. I added

[wsl2]
memory=5GB

to %HOMEPATH%\.wslconfig and yarn dev for Cypress worked.

So the following sequence used on a local clone of https://github.com/cypress-io/cypress ran successfully

yarn
yarn dev
npm start --prefix ../cypress-example-kitchensink & yarn cypress:run --project ../cypress-example-kitchensink

(see #27173 (comment))

This implicitly includes the smoke test.

Windows 11
Cypress 12.16.0
Node.js 16.16.0

Not everyone has the hardware to upgrade to Windows 11, so it's still relevant

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jul 4, 2023

@JosephKan3

Not everyone has the hardware to upgrade to Windows 11, so it's still relevant

Is it still reproducible on Windows 10 (using the latest version of WSL2 wsl --update)? I didn't mean to exclude Windows 10 here. WSLg is also available on Windows 10.

@JosephKan3
Copy link

@JosephKan3

Not everyone has the hardware to upgrade to Windows 11, so it's still relevant

Is it still reproducible on Windows 10 (using the latest version of WSL2 wsl --update)? I didn't mean to exclude Windows 10 here. WSLg is also available on Windows 10.

Yeah, looks like I'm on outdated info, WSLg support for Windows 10 has been added recently. I'm not sure if this issue is still needed then, I don't have an environment to reproduce it anymore.

@MikeMcC399
Copy link
Contributor

I checked that the Cypress RWA- Real World App also runs successfully under WSL2 (latest version - see #7065 (comment)) on Windows 11.

It would be great if somebody could confirm that Cypress also works with WSL2 on Windows 10 with Ubuntu 22.04.

The original issue was logged against Ubuntu 18.04, which entered into End of Standard Support in May 2023.

@nagash77 nagash77 added E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels Jul 5, 2023
@nagash77
Copy link
Contributor

nagash77 commented Jul 5, 2023

At this point in time Cypress does not officially support WSL/WSL2. I am going to close this until such time that we decide to fully support WSL/WSL2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing OS: windows prevent-stale mark an issue so it is ignored by stale[bot] Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

No branches or pull requests