-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 run cypress verify on Ubuntu 18.04 #6713
Comments
Seems your system has DISPLAY env variables set that is not valid xvfb - could you unset the variable and let Cypress spawn its own xvfb? See the standard error output for the exact warning
…Sent from my iPhone
On Mar 12, 2020, at 20:50, Bernard Hamlin ***@***.***> wrote:
Current behavior:
I cannot run cypress (specifically the verify command) on Ubuntu 18.04. It is a new install and I have all the dependencies from: https://on.cypress.io/required-dependencies installed.
example run on a brand new install of cypress 4.1.0 I run:
DEBUG=cypress:* npx cypress verify > output.txt 2>outputerr.txt
output.txt contains:
It looks like this is your first time using Cypress: 4.1.0
[12:07:57] Verifying Cypress can run /home/bernard/.cache/Cypress/4.1.0/Cypress [started]
[12:07:58] Verifying Cypress can run /home/bernard/.cache/Cypress/4.1.0/Cypress [failed]
[12:07:58] → 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.
----------
2020-03-12T23:07:57.913Z cypress:ts Running without ts-node hook in environment "production"
2020-03-12T23:07:58.229Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers
----------
Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 4.1.0
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.
----------
2020-03-12T23:07:57.913Z cypress:ts Running without ts-node hook in environment "production"
2020-03-12T23:07:58.229Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers
----------
Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 4.1.0
and outputerr.txt contains:
2020-03-12T23:10:00.724Z cypress:cli:cli cli starts with arguments ["/home/bernard/.nvm/versions/node/v10.19.0/bin/node","/home/bernard/dev/cypresstester/node_modules/.bin/cypress","verify"]
2020-03-12T23:10:00.726Z cypress:cli NODE_OPTIONS is not set
2020-03-12T23:10:00.726Z cypress:cli:cli program parsing arguments
2020-03-12T23:10:00.728Z cypress:cli parsed cli options {}
2020-03-12T23:10:00.785Z cypress:cli verifying Cypress app
2020-03-12T23:10:00.785Z cypress:cli checking environment variables
2020-03-12T23:10:00.790Z cypress:cli checking if executable exists /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress
2020-03-12T23:10:00.791Z cypress:cli Binary is executable? : true
2020-03-12T23:10:00.791Z cypress:cli binaryDir is /home/bernard/.cache/Cypress/4.1.0/Cypress
2020-03-12T23:10:00.792Z cypress:cli Reading binary package.json from: /home/bernard/.cache/Cypress/4.1.0/Cypress/resources/app/package.json
2020-03-12T23:10:00.794Z cypress:cli Found binary version 4.1.0 installed in: /home/bernard/.cache/Cypress/4.1.0/Cypress
2020-03-12T23:10:00.795Z cypress:cli could not read binary_state.json file at "/home/bernard/.cache/Cypress/4.1.0/binary_state.json"
2020-03-12T23:10:00.795Z cypress:cli {}
2020-03-12T23:10:00.795Z cypress:cli is Verified ? undefined
2020-03-12T23:10:00.795Z cypress:cli force verify
2020-03-12T23:10:00.795Z cypress:cli running binary verification check 4.1.0
2020-03-12T23:10:00.799Z cypress:cli clearing out the verified version
2020-03-12T23:10:00.800Z cypress:cli DISPLAY environment variable is set to :0 on Linux
Assuming this DISPLAY points at working X11 server,
Cypress will not spawn own Xvfb
NOTE: if the X11 server is NOT working, Cypress will exit without explanation,
see #4034
Solution: Unset the DISPLAY variable and try again:
DISPLAY= npx cypress run ...
2020-03-12T23:10:00.800Z cypress:cli needs Xvfb? false
2020-03-12T23:10:00.800Z cypress:cli spawning, should retry on display problem? true
2020-03-12T23:10:00.801Z cypress:cli disabling Electron sandbox
2020-03-12T23:10:00.801Z cypress:cli running smoke test
2020-03-12T23:10:00.801Z cypress:cli using Cypress executable /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress
2020-03-12T23:10:00.801Z cypress:cli smoke test command: /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress --no-sandbox --smoke-test --ping=498
2020-03-12T23:10:00.801Z cypress:cli smoke test timeout 30000 ms
2020-03-12T23:10:01.450Z cypress:cli Smoke test failed: { Error: Command failed: /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress --no-sandbox --smoke-test --ping=498
2020-03-12T23:10:00.928Z cypress:ts Running without ts-node hook in environment "production"
2020-03-12T23:10:01.256Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers
at makeError (/home/bernard/dev/cypresstester/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/home/bernard/dev/cypresstester/node_modules/execa/index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: null,
stdout: '',
stderr:
'2020-03-12T23:10:00.928Z cypress:ts Running without ts-node hook in environment "production"\n2020-03-12T23:10:01.256Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers\n',
failed: true,
signal: 'SIGSEGV',
cmd:
'/home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress --no-sandbox --smoke-test --ping=498',
timedOut: false,
killed: false }
2020-03-12T23:10:01.451Z cypress:cli error message: 2020-03-12T23:10:00.928Z cypress:ts Running without ts-node hook in environment "production"
2020-03-12T23:10:01.256Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers
it looks like I get this in dmesg:
[14372.512304] Cypress[13354]: segfault at c08 ip 000055ad97de2e01
sp 00007feff3f04630 error 6
I've then tried with DISPLAY= before to run it in Xvfb but I get the same output but the debug messages are slightly different:
2020-03-12T23:15:48.480Z cypress:cli:cli cli starts with arguments ["/home/bernard/.nvm/versions/node/v10.19.0/bin/node","/home/bernard/dev/cypresstester/node_modules/.bin/cypress","verify"]
2020-03-12T23:15:48.481Z cypress:cli NODE_OPTIONS is not set
2020-03-12T23:15:48.481Z cypress:cli:cli program parsing arguments
2020-03-12T23:15:48.483Z cypress:cli parsed cli options {}
2020-03-12T23:15:48.539Z cypress:cli verifying Cypress app
2020-03-12T23:15:48.540Z cypress:cli checking environment variables
2020-03-12T23:15:48.542Z cypress:cli checking if executable exists /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress
2020-03-12T23:15:48.542Z cypress:cli Binary is executable? : true
2020-03-12T23:15:48.543Z cypress:cli binaryDir is /home/bernard/.cache/Cypress/4.1.0/Cypress
2020-03-12T23:15:48.543Z cypress:cli Reading binary package.json from: /home/bernard/.cache/Cypress/4.1.0/Cypress/resources/app/package.json
2020-03-12T23:15:48.545Z cypress:cli Found binary version 4.1.0 installed in: /home/bernard/.cache/Cypress/4.1.0/Cypress
2020-03-12T23:15:48.545Z cypress:cli could not read binary_state.json file at "/home/bernard/.cache/Cypress/4.1.0/binary_state.json"
2020-03-12T23:15:48.545Z cypress:cli {}
2020-03-12T23:15:48.545Z cypress:cli is Verified ? undefined
2020-03-12T23:15:48.545Z cypress:cli force verify
2020-03-12T23:15:48.545Z cypress:cli running binary verification check 4.1.0
2020-03-12T23:15:48.549Z cypress:cli clearing out the verified version
2020-03-12T23:15:48.551Z cypress:cli undefined DISPLAY environment variable
2020-03-12T23:15:48.551Z cypress:cli Cypress will spawn its own Xvfb
2020-03-12T23:15:48.551Z cypress:cli needs Xvfb? true
2020-03-12T23:15:48.551Z cypress:cli Starting Xvfb
2020-03-12T23:15:48.568Z cypress:cli disabling Electron sandbox
2020-03-12T23:15:48.568Z cypress:cli running smoke test
2020-03-12T23:15:48.568Z cypress:cli using Cypress executable /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress
2020-03-12T23:15:48.568Z cypress:cli smoke test command: /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress --no-sandbox --smoke-test --ping=257
2020-03-12T23:15:48.568Z cypress:cli smoke test timeout 30000 ms
2020-03-12T23:15:49.238Z cypress:cli Smoke test failed: { Error: Command failed: /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress --no-sandbox --smoke-test --ping=257
2020-03-12T23:15:48.719Z cypress:ts Running without ts-node hook in environment "production"
2020-03-12T23:15:49.053Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers
at makeError (/home/bernard/dev/cypresstester/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/home/bernard/dev/cypresstester/node_modules/execa/index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: null,
stdout: '',
stderr:
'2020-03-12T23:15:48.719Z cypress:ts Running without ts-node hook in environment "production"\n2020-03-12T23:15:49.053Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers\n',
failed: true,
signal: 'SIGSEGV',
cmd:
'/home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress --no-sandbox --smoke-test --ping=257',
timedOut: false,
killed: false }
2020-03-12T23:15:49.239Z cypress:cli error message: 2020-03-12T23:15:48.719Z cypress:ts Running without ts-node hook in environment "production"
2020-03-12T23:15:49.053Z cypress:server:appdata path: /home/bernard/.config/Cypress/cy/production/browsers
2020-03-12T23:15:49.242Z cypress:cli Stopping Xvfb
Any clues how to debug this further would be great . Things I've tried:
increasing the timeout in the lib/task/verify.js - this results in the same error, it just takes longer
setting unsetting DISPLAY (as above)
running the task with gdb:
gdb ~/.cache/Cypress/4.1.0/Cypress/Cypress
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress...(no debugging symbols found)...done.
(gdb) run --smoke-test
Starting program: /home/bernard/.cache/Cypress/4.1.0/Cypress/Cypress --smoke-test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe8cbf700 (LWP 25807)]
[New Thread 0x7fffe84be700 (LWP 25812)]
repeats....
[New Thread 0x7fffab71d700 (LWP 25931)]
Thread 120 "Cypress" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffac71f700 (LWP 25929)]
0x000055555bf3be01 in __start_google_malloc ()
Seems similar to issues: #2431 #4258 #4624
Versions
Platform: linux (Ubuntu Linux - 18.04) (kernel 4.15)
Cypress Version: 4.1.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks - but I thought I tried that scenario the logs seem to think Xvfb was run eg the command
ideally I would run it without Xvfb (it is a desktop system) but i may be misunderstanding how that works. |
It should work if the desktop has Display set already, not sure what would be the other reason then
…Sent from my iPhone
On Mar 12, 2020, at 21:22, Bernard Hamlin ***@***.***> wrote:
Thanks - but I thought I tried that scenario the logs seem to think Xvfb was run eg the command DISPLAY= npx cypress verify gives the output above and it looks like Xvfb is running:
2020-03-12T23:15:48.551Z cypress:cli undefined DISPLAY environment variable
2020-03-12T23:15:48.551Z cypress:cli Cypress will spawn its own Xvfb
2020-03-12T23:15:48.551Z cypress:cli needs Xvfb? true
2020-03-12T23:15:48.551Z cypress:cli Starting Xvfb
ideally I would run it without Xvfb (it is a desktop system) but i may be misunderstanding how that works.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@blueo can you try running different versions of Cypress? Like 3.8.3, 4.0.1, maybe older 3.4.1? |
Sure can, this is from 3.6.1:
and
I've also verified that my display var |
You will have to unset the DISPLAY variable as specified in the error message for Cypress to work. See #4034
|
Current behavior:
I cannot run cypress (specifically the verify command) on Ubuntu 18.04. It is a new install and I have all the dependencies from: https://on.cypress.io/required-dependencies installed.
example run on a brand new install of cypress 4.1.0 I run:
DEBUG=cypress:* npx cypress verify > output.txt 2>outputerr.txt
output.txt contains:
and outputerr.txt contains:
it looks like I get this in dmesg:
I've then tried with
DISPLAY=
before to run it in Xvfb but I get the same output but the debug messages are slightly different:Any clues how to debug this further would be great . Things I've tried:
Seems similar to issues: #2431 #4258 #4624
Versions
Platform: linux (Ubuntu Linux - 18.04) (kernel 4.15)
Cypress Version: 4.1.0
The text was updated successfully, but these errors were encountered: