Description
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).
Activity
GertVil commentedon Jan 17, 2020
We are experiencing the same error. We had a docker container working yesterday, rebuild the docker today, so newer versions installed through apt and now it's broken with the same error described above.
GertVil commentedon Jan 17, 2020
I've got a docker image before it was broken. If I run the following command
you can see cypress starts and correctly waits for something that's not running.
If I do an
apt update
andapt upgrade
with the following output:and the I run the previous command again I get this output
A workaround found by @krishofmans is running your command prefixed with
xvfb-run --server-args="-screen 0 1024x768x24"
graemeRharvey commentedon Jan 17, 2020
We are seeing this as well, but our detailed error description isn't the same as the one listed above.
Ours is:
Due to this, the workaround listed above doesn't appear to work. I wouldn't normally assume they're the same issue, but they seem to have appeared along the same timeline.
drewbrend commentedon Jan 17, 2020
I logged this as well but thought it was resolved yesterday so I closed my issue. We're still seeing this and this issue has output with debug logging turned on: #6182
dschwank commentedon Jan 17, 2020
We are facing the same issue - we assume that the error is caused by one of these packages:
All of them are also in the list of @GertVil. As quickfix we switched back to an older base image.
Esskla commentedon Jan 17, 2020
We got this issue since yesterday after our container has been rebuilt. I couldn't figure out which package causes this problem.
We are using the same packages which are implemented in the cypress/base:10 dockerfile.
isnotgood commentedon Jan 20, 2020
Got the source of the problem, Xvfb is run without
-screen
so electron dies with:If is set fallback
this._xvfb_args = options.xvfb_args || [ '-screen', '0', '1024x768x24' ]
at @cypress/xvfb it looks like everything works.raffienficiaud commentedon Jan 21, 2020
I also hit the same issue since yesterday. The instance is started on a clean docker container with all the necessary package mentioned in the cypress.io website.
I worked around this by pre-pending the commands with
xvfb-run ...
. The path that led me to this:DEBUG=cypress:cli,xvfb cypress verify
saysfrom that I just ran the command that was printed
/root/.cache/Cypress/3.8.2/Cypress/Cypress
and gotwhile the previous message clearly indicates that it runs
xvfb
redoing the same command with
xvfb-run
just works:So all in all it looks like a bug in Cypress, certainly related to #4624 .
chromakode commentedon Jan 22, 2020
I'm seeing the same issue with a bionic docker image. We pinpointed it to the following packages:
Wrapping our invocation of cypress with
xvfb-run -s '-screen 0 1024x768x24'
worked around this issue.ci: tentatively fix cypress failure
23 remaining items