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

Can't start cypress 3.4.1 #4884

Closed
angel-git opened this issue Jul 31, 2019 · 11 comments
Closed

Can't start cypress 3.4.1 #4884

angel-git opened this issue Jul 31, 2019 · 11 comments
Assignees
Labels
OS: linux pkg/electron This is due to an issue in the packages/electron directory

Comments

@angel-git
Copy link

Today we updated to cypress 3.4.1 and we are receiving the following error:

[2019-07-31T07:20:58.378Z] [09:20:53]  Verifying Cypress can run /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress [started]
[2019-07-31T07:20:58.378Z] [09:20:54]  Verifying Cypress can run /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress [failed]
[2019-07-31T07:20:58.378Z] Cypress failed to start.
[2019-07-31T07:20:58.378Z] 
[2019-07-31T07:20:58.378Z] This is usually caused by a missing library or dependency.
[2019-07-31T07:20:58.378Z] 
[2019-07-31T07:20:58.378Z] The error below should indicate which dependency is missing.
[2019-07-31T07:20:58.378Z] 
[2019-07-31T07:20:58.378Z] https://on.cypress.io/required-dependencies
[2019-07-31T07:20:58.378Z] 
[2019-07-31T07:20:58.378Z] If you are using Docker, we provide containers with all required dependencies installed.
[2019-07-31T07:20:58.378Z] 
[2019-07-31T07:20:58.378Z] ----------
[2019-07-31T07:20:58.378Z] 
[2019-07-31T07:20:58.378Z] Command failed: /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=964

So i enabled the debug logs and got the following:

/var/lib/jenkins/node_modules/cypress/bin/cypress run
  cypress:cli cli starts with arguments ["/usr/bin/node","/var/lib/jenkins/node_modules/cypress/bin/cypress","run"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli program parsing arguments +5ms
  cypress:cli running Cypress +1ms
  cypress:cli parsed cli options {} +83ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +1ms
  cypress:cli checking if executable exists /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress +4ms
  cypress:cli Binary is executable? : true +3ms
  cypress:cli binaryDir is  /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress +1ms
  cypress:cli Reading binary package.json from: /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/resources/app/package.json +0ms
  cypress:cli Found binary version 3.4.1 installed in: /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress +4ms
  cypress:cli could not read binary_state.json file +6ms
  cypress:cli {} +0ms
  cypress:cli is Verified ? undefined +2ms
  cypress:cli running binary verification check 3.4.1 +0ms
It looks like this is your first time using Cypress: 3.4.1

  cypress:cli clearing out the verified version +5ms
  cypress:cli undefined DISPLAY environment variable +0ms
  cypress:cli Cypress will spawn its own Xvfb +0ms
  cypress:cli needs Xvfb? true +2ms
  cypress:cli Starting Xvfb +0ms
  xvfb lock filename /tmp/.X99-lock +0ms
  xvfb lock filename /tmp/.X99-lock +0ms
  xvfb setting DISPLAY :99 +0ms
  xvfb all Xvfb arguments [ ':99' ] +3ms
  xvfb checking if started by looking for the lock file /tmp/.X99-lock +8ms
  xvfb checking if started by looking for the lock file /tmp/.X99-lock +11ms
  xvfb lock file /tmp/.X99-lock found after 10 ms +0ms
  cypress:cli running smoke test +24ms
  cypress:cli using Cypress executable /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress +0ms
  cypress:cli smoke test command: /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=208 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
 ⠙  Verifying Cypress can run /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress
  cypress:cli Smoke test failed: { Error: Command failed: /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=208


    at makeError (/var/lib/jenkins/node_modules/execa/index.js:172:9)
    at Promise.all.then.arr (/var/lib/jenkins/node_modules/execa/index.js:277:16)
    at process._tickCallback (internal/process/next_tick.js:109:7)
  code: null,
  stdout: '',
  stderr: '',
  failed: true,
  signal: 'SIGSEGV',
  cmd: '/var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=208',
  timedOut: false,
  killed: false } +147ms
  cypress:cli error message: Command failed: /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=208

 +1ms
  cypress:cli Stopping Xvfb +177ms
  xvfb restoring process.env.DISPLAY variable +155ms
  xvfb lock filename /tmp/.X99-lock +0ms
 ⠹  Verifying Cypress can run /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress
 ✖  Verifying Cypress can run /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress
   → Cypress Version: 3.4.1
Cypress failed to start.

So I tried the following:

[jenkins@jenkins-slave7-xlr ~]$ Xvfb :88 &
[1] 18067
[jenkins@jenkins-slave7-xlr ~]$ export DISPLAY=:88
[jenkins@jenkins-slave7-xlr ~]$  /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress open
Segmentation fault

Also with gdb

gdb /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress...Missing separate debuginfo for /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress
(no debugging symbols found)...done.
(gdb) run --smoke-test
Starting program: /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test
Missing separate debuginfo for /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/libnode.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/libffmpeg.so
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/d8/783c7a546b1cfe62dc6bff19a059f879e7d912.debug
[New Thread 0x7fffe1c66700 (LWP 18176)]
Detaching after fork from child process 18177.

Program received signal SIGSEGV, Segmentation fault.
0x00007fffefec801f in __rawmemchr_sse2 () from /lib64/libc.so.6

LDD output:

ldd /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress
	linux-vdso.so.1 =>  (0x00007fff1d7f6000)
	libnode.so => /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/libnode.so (0x00007f2c8058a000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2c8035f000)
	libgtk-3.so.0 => /lib64/libgtk-3.so.0 (0x00007f2c7fa55000)
	libgdk-3.so.0 => /lib64/libgdk-3.so.0 (0x00007f2c7f79d000)
	libpangocairo-1.0.so.0 => /lib64/libpangocairo-1.0.so.0 (0x00007f2c7f58f000)
	libpango-1.0.so.0 => /lib64/libpango-1.0.so.0 (0x00007f2c7f344000)
	libatk-1.0.so.0 => /lib64/libatk-1.0.so.0 (0x00007f2c7f11e000)
	libcairo.so.2 => /lib64/libcairo.so.2 (0x00007f2c7edf5000)
	libgdk_pixbuf-2.0.so.0 => /lib64/libgdk_pixbuf-2.0.so.0 (0x00007f2c7ebcd000)
	libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f2c7e82e000)
	libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f2c7e5dd000)
	libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007f2c7e395000)
	libX11-xcb.so.1 => /lib64/libX11-xcb.so.1 (0x00007f2c7e193000)
	libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f2c7df6a000)
	libXi.so.6 => /lib64/libXi.so.6 (0x00007f2c7dd5a000)
	libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007f2c7db4f000)
	libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007f2c7d94b000)
	libXrandr.so.2 => /lib64/libXrandr.so.2 (0x00007f2c7d740000)
	libXcomposite.so.1 => /lib64/libXcomposite.so.1 (0x00007f2c7d53d000)
	libXext.so.6 => /lib64/libXext.so.6 (0x00007f2c7d32a000)
	libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f2c7d124000)
	libXrender.so.1 => /lib64/libXrender.so.1 (0x00007f2c7cf19000)
	libX11.so.6 => /lib64/libX11.so.6 (0x00007f2c7cbda000)
	libXtst.so.6 => /lib64/libXtst.so.6 (0x00007f2c7c9d4000)
	libXss.so.1 => /lib64/libXss.so.1 (0x00007f2c7c7d0000)
	libgconf-2.so.4 => /lib64/libgconf-2.so.4 (0x00007f2c7c59e000)
	libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f2c7c39a000)
	libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f2c7c084000)
	libnss3.so => /lib64/libnss3.so (0x00007f2c7bd59000)
	libnssutil3.so => /lib64/libnssutil3.so (0x00007f2c7bb2c000)
	libsmime3.so => /lib64/libsmime3.so (0x00007f2c7b905000)
	libnspr4.so => /lib64/libnspr4.so (0x00007f2c7b6c6000)
	libffmpeg.so => /var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/libffmpeg.so (0x00007f2c7b260000)
	libasound.so.2 => /lib64/libasound.so.2 (0x00007f2c7af62000)
	libcups.so.2 => /lib64/libcups.so.2 (0x00007f2c7acf8000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f2c7aaf0000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f2c7a8ec000)
	libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f2c7a6ae000)
	libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f2c7a484000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2c7a17d000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f2c79e7a000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2c79c64000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f2c798a1000)
	/lib64/ld-linux-x86-64.so.2 (0x0000558e73983000)
	libcairo-gobject.so.2 => /lib64/libcairo-gobject.so.2 (0x00007f2c79697000)
	libatk-bridge-2.0.so.0 => /lib64/libatk-bridge-2.0.so.0 (0x00007f2c79468000)
	libepoxy.so.0 => /lib64/libepoxy.so.0 (0x00007f2c79173000)
	libpangoft2-1.0.so.0 => /lib64/libpangoft2-1.0.so.0 (0x00007f2c78f5c000)
	libXinerama.so.1 => /lib64/libXinerama.so.1 (0x00007f2c78d59000)
	libthai.so.0 => /lib64/libthai.so.0 (0x00007f2c78b4c000)
	libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f2c7894a000)
	libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 (0x00007f2c786e7000)
	libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007f2c78440000)
	libpixman-1.so.0 => /lib64/libpixman-1.so.0 (0x00007f2c78197000)
	libEGL.so.1 => /lib64/libEGL.so.1 (0x00007f2c77f69000)
	libpng15.so.15 => /lib64/libpng15.so.15 (0x00007f2c77d3e000)
	libxcb-shm.so.0 => /lib64/libxcb-shm.so.0 (0x00007f2c77b3a000)
	libxcb-render.so.0 => /lib64/libxcb-render.so.0 (0x00007f2c7792c000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f2c77715000)
	libGL.so.1 => /lib64/libGL.so.1 (0x00007f2c774a3000)
	libffi.so.6 => /lib64/libffi.so.6 (0x00007f2c7729a000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f2c77038000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f2c76e11000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f2c76bf7000)
	libmount.so.1 => /lib64/libmount.so.1 (0x00007f2c769b4000)
	libXau.so.6 => /lib64/libXau.so.6 (0x00007f2c767b0000)
	libdbus-glib-1.so.2 => /lib64/libdbus-glib-1.so.2 (0x00007f2c76587000)
	libplc4.so => /lib64/libplc4.so (0x00007f2c76382000)
	libplds4.so => /lib64/libplds4.so (0x00007f2c7617e000)
	libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f2c75f30000)
	libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f2c75c48000)
	libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f2c75a14000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f2c75810000)
	libssl.so.10 => /lib64/libssl.so.10 (0x00007f2c7559e000)
	libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f2c7513b000)
	libavahi-common.so.3 => /lib64/libavahi-common.so.3 (0x00007f2c74f2e000)
	libavahi-client.so.3 => /lib64/libavahi-client.so.3 (0x00007f2c74d1d000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f2c74ae5000)
	libatspi.so.0 => /lib64/libatspi.so.0 (0x00007f2c748b5000)
	libgraphite2.so.3 => /lib64/libgraphite2.so.3 (0x00007f2c74686000)
	libxcb-dri2.so.0 => /lib64/libxcb-dri2.so.0 (0x00007f2c74481000)
	libxcb-xfixes.so.0 => /lib64/libxcb-xfixes.so.0 (0x00007f2c74279000)
	libxcb-dri3.so.0 => /lib64/libxcb-dri3.so.0 (0x00007f2c74075000)
	libxcb-present.so.0 => /lib64/libxcb-present.so.0 (0x00007f2c73e72000)
	libxcb-sync.so.1 => /lib64/libxcb-sync.so.1 (0x00007f2c73c6b000)
	libxshmfence.so.1 => /lib64/libxshmfence.so.1 (0x00007f2c73a67000)
	libgbm.so.1 => /lib64/libgbm.so.1 (0x00007f2c7385b000)
	libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f2c7364c000)
	libglapi.so.0 => /lib64/libglapi.so.0 (0x00007f2c7341c000)
	libxcb-glx.so.0 => /lib64/libxcb-glx.so.0 (0x00007f2c73201000)
	libXxf86vm.so.1 => /lib64/libXxf86vm.so.1 (0x00007f2c72ffb000)
	libblkid.so.1 => /lib64/libblkid.so.1 (0x00007f2c72dbb000)
	libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f2c72bb6000)
	libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f2c729a7000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f2c727a3000)
	libfreebl3.so => /lib64/libfreebl3.so (0x00007f2c7259f000)

Steps to reproduce: (app code and test code)

Looks like related to #4624 but there the error message said signal: 'SIGTERM', while to me is signal: 'SIGSEGV'

I can't reproduce on my local machine, so it could be some outdated libraries or latest cypress requirements changed?

Versions

The previous version was 3.2.0 and run fine.

cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
@angel-git
Copy link
Author

Issue appears on 3.3.0 maybe related? to:

@angel-git
Copy link
Author

After few more investigation, managed to get the stacktrace from the segmentation fault:

#0  0x00007fffefec801f in __rawmemchr_sse2 () from /lib64/libc.so.6
#1  0x00007fffefeb1fa2 in _IO_str_init_static_internal () from /lib64/libc.so.6
#2  0x00007fffefea11b7 in __isoc99_vsscanf () from /lib64/libc.so.6
#3  0x00007fffefea1157 in __isoc99_sscanf () from /lib64/libc.so.6
#4  0x00007fffef7a6862 in epoxy_glx_version () from /lib64/libepoxy.so.0
#5  0x00007ffff5d89747 in gdk_x11_screen_init_gl () from /lib64/libgdk-3.so.0
#6  0x00007ffff5d89cc8 in _gdk_x11_screen_update_visuals_for_gl () from /lib64/libgdk-3.so.0
#7  0x00007ffff5d92a85 in _gdk_x11_screen_init_visuals () from /lib64/libgdk-3.so.0
#8  0x00007ffff5d8f900 in _gdk_x11_screen_new () from /lib64/libgdk-3.so.0
#9  0x00007ffff5d7f268 in _gdk_x11_display_open () from /lib64/libgdk-3.so.0
#10 0x00007ffff5d53389 in gdk_display_manager_open_display () from /lib64/libgdk-3.so.0
#11 0x00007ffff62110da in gtk_init_check () from /lib64/libgtk-3.so.0
#12 0x00007ffff6211109 in gtk_init () from /lib64/libgtk-3.so.0
#13 0x00000000018e5186 in ?? ()
#14 0x00000000018dcfdf in ?? ()
#15 0x00000000018dfb46 in ?? ()
#16 0x0000000004f25d64 in brightray::BrowserMainParts::PreEarlyInitialization() ()
#17 0x0000000004e2fc19 in atom::AtomBrowserMainParts::PreEarlyInitialization() ()
#18 0x0000000001c73532 in ?? ()
#19 0x0000000001d8a006 in ?? ()
#20 0x0000000001e6a88d in ?? ()
#21 0x0000000001b19c1c in ?? ()
#22 0x0000000003023e3d in ?? ()
#23 0x0000000001b18d62 in ?? ()
#24 0x0000000004dcc968 in main ()

So it looks like coming from glx, so i did a small test:

Almost default settings:

Xvfb :99 -screen 0 1280x800x8 &
export DISPLAY=:99
/var/lib/jenkins/.cache/Cypress/3.2.0/Cypress/Cypress --smoke-test --ping=100
100

/var/lib/jenkins/.cache/Cypress/3.3.0/Cypress/Cypress --smoke-test --ping=100
Segmentation fault

/var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=100
Segmentation fault

With increased depth

Xvfb :88 -screen 0 1280x800x24 &
export DISPLAY=:88
/var/lib/jenkins/.cache/Cypress/3.2.0/Cypress/Cypress --smoke-test --ping=100
100

/var/lib/jenkins/.cache/Cypress/3.3.0/Cypress/Cypress --smoke-test --ping=100
100

/var/lib/jenkins/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=100
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
100

So setting the depth of the xvfb fixes the problem for me (default is 8), what could be the reason that from 3.3.0 the default depth doesn't work anymore?

@bahmutov bahmutov self-assigned this Jul 31, 2019
@bahmutov bahmutov added the pkg/electron This is due to an issue in the packages/electron directory label Jul 31, 2019
@angel-git
Copy link
Author

Sorry for another update :D

Looks like some change on electron? uses now some hardware accelerated feature? (this is just a guess) and some issue on our version of libepoxy 1.3.1 produced the segmentation fault when depth of 8 is used[1]

Updating libepoxy to 1.5.2 fixes the issue.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=99027

@bahmutov
Copy link
Contributor

Hi @angel-git
1 - I applaud you for hunting down the change and the fix
2 - you are using the native OS, not a Docker image? Would it help for us to build another centOS image with updated libepoxy in the image?

@angel-git
Copy link
Author

@bahmutov
thanks! we manage our own servers so no worry about the image :-)

@dhruv5201
Copy link

Hey.. Is this issue resolved for every one. I have just installed 3.4.1 in my Windows 10. I am facing this issue.
Please let me know the solution if anybody already has.
Thanks in advance!!

@photz
Copy link

photz commented Oct 17, 2019

I got the same error on Ubuntu 16.04.6 when updating to Cypress 3.4.1. I downgraded to 3.4.0 and it works again.

@AliTechGeek52
Copy link

I got the same error on Mac when updating Cypress 3.4.1 to Cypress 3.5.0 the issue is resolved...

@jennifer-shehane
Copy link
Member

Closing as resolved. Please comment if you are still having this issue and we will consider reopening.

@AliTechGeek52
Copy link

@jennifer-shehane I think no need to reopen this when changing cypress version it resolved.

@cypress-io cypress-io locked and limited conversation to collaborators Jan 2, 2020
@jennifer-shehane
Copy link
Member

This was fixed as part of #6199 and released in 3.8.3.

Duplicate of #6184

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
OS: linux pkg/electron This is due to an issue in the packages/electron directory
Projects
None yet
Development

No branches or pull requests

6 participants