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 verify command failing

See original GitHub issue

Current behavior:

After an apt update of ubuntu 18.04 (yesterday 16/01/2020), the following cypress command return an error. npx cypress verify

It looks like this is your first time using Cypress: 3.8.2

✖ Verifying Cypress can run /root/.cache/Cypress/3.8.2/Cypress → Cypress Version: 3.8.2 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.8.2/Cypress/Cypress --no-sandbox --smoke-test --ping=24


Platform: linux (Ubuntu Linux - 18.04) Cypress Version: 3.8.2

/root/.cache/Cypress/3.8.2/Cypress/Cypress --no-sandbox --smoke-test --ping=24

(Cypress:20915): Gtk-WARNING **: 12:20:46.593: cannot open display:

Desired behavior:

cypress verify should pass

Test code to reproduce

Versions

Ubuntu Linux - 18.04 Cypress Version: 3.8.2

Packages Versions :

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

libgtk2.0-0 is already the newest version (2.24.32-1ubuntu1). libnotify-dev is already the newest version (0.7.7-3). libxss1 is already the newest version (1:1.2.2-1). libxtst6 is already the newest version (2:1.2.3-1). xauth is already the newest version (1:1.0.10-1). libgconf-2-4 is already the newest version (3.2.6-4ubuntu1). libasound2 is already the newest version (1.1.3-5ubuntu0.2). libgtk-3-0 is already the newest version (3.22.30-1ubuntu4). libnss3 is already the newest version (2:3.35-2ubuntu2.7). xvfb is already the newest version (2:1.19.6-1ubuntu4.3).

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
isnotgoodcommented, Jan 20, 2020

Got the source of the problem, Xvfb is run without -screen so electron dies with:

Received signal 11 SEGV_MAPERR ffffef7352286c69
#0 0x56379509d3d9 (/root/.cache/Cypress/3.8.2/Cypress/Cypress+0x35d13d8)
r8: 0000000000000000  r9: 00007ffe15194500 r10: 00007ffe15194458 r11: 000000000000000e
r12: 00007ffe151945ac r13: 00007f595336d720 r14: ffffef7352286c39 r15: 00007f5954966200
di: 0000000000000000  si: 0000000000000020  bp: 0000000000000000  bx: 0000108e1c720e70
dx: 0000000000000001  ax: 0000000000000030  cx: 0000000000000001  sp: 00007ffe15194580
ip: 00007f595494a2dd efl: 0000000000010246 cgf: 002b000000000033 erf: 0000000000000005
trp: 000000000000000e msk: 0000000000000000 cr2: ffffef7352286c69
[end of stack trace]
Calling _exit(1). Core file will not be generated.

If is set fallback this._xvfb_args = options.xvfb_args || [ '-screen', '0', '1024x768x24' ] at @cypress/xvfb it looks like everything works.

4reactions
GertVilcommented, Jan 17, 2020

I’ve got a docker image before it was broken. If I run the following command

cypress run --config-file ./cypress/cypress.json
Cypress could not verify that this server is running:

  > http://localhost:8080/

you can see cypress starts and correctly waits for something that’s not running. If I do an apt update and apt upgrade with the following output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libllvm8
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  libllvm9
The following packages will be upgraded:
  apt base-files bash bsdutils bzip2 debconf dpkg dumb-init e2fsprogs fdisk gcc-8-base grep java-common libapt-pkg5.0 libblkid1
  libbz2-1.0 libcom-err2 libdb5.3 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libexpat1
  libext2fs2 libfdisk1 libgcc1 libgcrypt20 libgl1-mesa-dri libglapi-mesa libglx-mesa0 libgnutls30 libidn2-0 libldap-2.4-2
  libldap-common libmount1 libpam-modules libpam-modules-bin libpam-runtime libpam0g libprocps6 libsmartcols1 libsqlite3-0 libss2
  libstdc++6 libsystemd0 libudev1 libunistring2 libuuid1 libx11-data libzstd1 login mount passwd util-linux zulu-8
57 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 142 MB of archives.
Preparing to unpack .../02-libsqlite3-0_3.22.0-1ubuntu0.2_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.22.0-1ubuntu0.2) over (3.22.0-1) ...
Preparing to unpack .../03-libdrm-common_2.4.99-1ubuntu1~18.04.1_all.deb ...
Unpacking libdrm-common (2.4.99-1ubuntu1~18.04.1) over (2.4.97-1ubuntu1~18.04.1) ...
Preparing to unpack .../04-libdrm2_2.4.99-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libdrm2:amd64 (2.4.99-1ubuntu1~18.04.1) over (2.4.97-1ubuntu1~18.04.1) ...
Preparing to unpack .../05-libx11-data_2%3a1.6.4-3ubuntu0.2_all.deb ...
Unpacking libx11-data (2:1.6.4-3ubuntu0.2) over (2:1.6.4-3ubuntu0.1) ...
Preparing to unpack .../06-java-common_0.68ubuntu1~18.04.1_all.deb ...
Unpacking java-common (0.68ubuntu1~18.04.1) over (0.63ubuntu1~02) ...
Preparing to unpack .../07-libdrm-amdgpu1_2.4.99-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libdrm-amdgpu1:amd64 (2.4.99-1ubuntu1~18.04.1) over (2.4.97-1ubuntu1~18.04.1) ...
Preparing to unpack .../08-libdrm-intel1_2.4.99-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libdrm-intel1:amd64 (2.4.99-1ubuntu1~18.04.1) over (2.4.97-1ubuntu1~18.04.1) ...
Preparing to unpack .../09-libdrm-nouveau2_2.4.99-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libdrm-nouveau2:amd64 (2.4.99-1ubuntu1~18.04.1) over (2.4.97-1ubuntu1~18.04.1) ...
Preparing to unpack .../10-libdrm-radeon1_2.4.99-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libdrm-radeon1:amd64 (2.4.99-1ubuntu1~18.04.1) over (2.4.97-1ubuntu1~18.04.1) ...
Preparing to unpack .../11-libglx-mesa0_19.2.1-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libglx-mesa0:amd64 (19.2.1-1ubuntu1~18.04.1) over (19.0.8-0ubuntu0~18.04.3) ...
Preparing to unpack .../12-libglapi-mesa_19.2.1-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libglapi-mesa:amd64 (19.2.1-1ubuntu1~18.04.1) over (19.0.8-0ubuntu0~18.04.3) ...
Selecting previously unselected package libllvm9:amd64.
Preparing to unpack .../13-libllvm9_1%3a9-2~ubuntu18.04.1_amd64.deb ...
Unpacking libllvm9:amd64 (1:9-2~ubuntu18.04.1) ...
Preparing to unpack .../14-libgl1-mesa-dri_19.2.1-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libgl1-mesa-dri:amd64 (19.2.1-1ubuntu1~18.04.1) over (19.0.8-0ubuntu0~18.04.3) ...
Preparing to unpack .../15-libldap-common_2.4.45+dfsg-1ubuntu1.4_all.deb ...
Unpacking libldap-common (2.4.45+dfsg-1ubuntu1.4) over (2.4.45+dfsg-1ubuntu1.1) ...
Preparing to unpack .../16-libldap-2.4-2_2.4.45+dfsg-1ubuntu1.4_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.4) over (2.4.45+dfsg-1ubuntu1.1) ...
Preparing to unpack .../17-dumb-init_1.2.1-1_amd64.deb ...
Unpacking dumb-init (1.2.1-1) over (1.1.3) ...
Preparing to unpack .../18-zulu-8_8.44.0.9_amd64.deb ...
Unpacking zulu-8 (8.44.0.9) over (8.36.0.1) ...
Setting up libexpat1:amd64 (2.2.5-3ubuntu0.2) ...
Setting up libldap-common (2.4.45+dfsg-1ubuntu1.4) ...
Setting up mount (2.31.1-0.4ubuntu3.4) ...
Setting up java-common (0.68ubuntu1~18.04.1) ...
Setting up libglapi-mesa:amd64 (19.2.1-1ubuntu1~18.04.1) ...
Setting up libprocps6:amd64 (2:3.3.12-3ubuntu1.2) ...
Setting up bzip2 (1.0.6-8.1ubuntu0.2) ...
Setting up libdrm-common (2.4.99-1ubuntu1~18.04.1) ...
Setting up libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.4) ...
Setting up zulu-8 (8.44.0.9) ...
update-alternatives: using /usr/lib/jvm/zulu-8-amd64/bin/clhsdb to provide /usr/bin/clhsdb (clhsdb) in auto mode
update-alternatives: using /usr/lib/jvm/zulu-8-amd64/bin/hsdb to provide /usr/bin/hsdb (hsdb) in auto mode
update-alternatives: using /usr/lib/jvm/zulu-8-amd64/bin/jfr to provide /usr/bin/jfr (jfr) in auto mode
Setting up libsqlite3-0:amd64 (3.22.0-1ubuntu0.2) ...
Setting up dumb-init (1.2.1-1) ...
Setting up libllvm9:amd64 (1:9-2~ubuntu18.04.1) ...
Setting up libx11-data (2:1.6.4-3ubuntu0.2) ...
Setting up libdrm2:amd64 (2.4.99-1ubuntu1~18.04.1) ...
Setting up libdrm-intel1:amd64 (2.4.99-1ubuntu1~18.04.1) ...
Setting up libdrm-radeon1:amd64 (2.4.99-1ubuntu1~18.04.1) ...
Setting up libdrm-nouveau2:amd64 (2.4.99-1ubuntu1~18.04.1) ...
Setting up libdrm-amdgpu1:amd64 (2.4.99-1ubuntu1~18.04.1) ...
Setting up libgl1-mesa-dri:amd64 (19.2.1-1ubuntu1~18.04.1) ...
Setting up libglx-mesa0:amd64 (19.2.1-1ubuntu1~18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for mime-support (3.60ubuntu1) ...

and the I run the previous command again I get this output

cypress run --config-file ./cypress/cypress.json
The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 3.8.2

A workaround found by @krishofmans is running your command prefixed with xvfb-run --server-args="-screen 0 1024x768x24"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress verification timed out after 30000 milliseconds
Open node_modules\cypress\lib\tasks\verify.js , search for VERIFY_TEST_RUNNER_TIMEOUT_MS and change it from 30000 (default) to 100000 . Save the ...
Read more >
Error Messages | Cypress Documentation
By default Cypress detects if an element you're trying to interact with is animating. This check ensures that an element is not animating...
Read more >
Cypress 9.2.0 introduces a new environment variable ...
'Cypress verify' command gets executed as part of the 'cypress open' and 'cypress run' commands. Cypress now provides an option to override ...
Read more >
cypress-io/cypress - Gitter
I've added this in my index.js and the test itself doesn't fail now but the ... The previous command that ran was: >...
Read more >
How to handle Errors in Cypress | BrowserStack
An Exception or an Error is an abnormal event, which may break the normal flow of test script execution, in turn causing the...
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