-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Cypress can't detect DISPLAY or is unable to look at DISPLAY export/set variable #18183
Comments
I removed the DISPLAY variable (also) from the docker argument failing in the same way... but you can look that Cypress tries to open xvfb with some error about the rights of a file (the user who runs the pipeline, of course is not root, and I put on the log with ** before to be easy to find it) here is the debug if needed:
|
hi, any updates on how to resolve this? getting the exact same error when I run
|
same issue ❯ /home/../.cache/Cypress/10.10.0/Cypress/Cypress --smoke-test --ping=101
[8203:1012/104109.529617:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[8203:1012/104109.529677:ERROR:env.cc(255)] The platform failed to initialize. Exiting.
[1] 8203 segmentation fault /home/.../.cache/Cypress/10.10.0/Cypress/Cypress --smoke-test --ping=101 |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior
When trying to run Cypress 8.3.1 inside a Docker image in a Jenkins job with an error:
[FAILED] [678:0921/135247.479719:ERROR:browser_main_loop.cc(1402)] Unable to open X display.
More information
Running the command
npx cypress info
on the pipeline also fails with this message:Docker image used: cypress/browsers:node14.17.0-chrome91-ff89
Added on that image the script that runs the xvfb
Xvfb :99 -screen 0 1024x768x24 -nolisten tcp &
Tested setting the
export DISPLAY=:99
andunset DISPLAY
on the step of the pipeline (in order to make Cypress open their own xvfb) with no success (same error).Also, on the pipeline, I added this line
xdpyinfo -display :99 >/dev/null 2>&1 && echo "Display is: In use" || echo "Display is: Free"
to check if the Xvfb is running and on that display and yes, it is.Debug Mode
Opened Cypress with DEBUG=cypress:* and export DISPLAY variable:
Opened Cypress with DEBUG=cypress:* and no DISPLAY variable:
Opened Cypress with DEBUG=cypress:* with unset DISPLAY variable:
Desired behavior
It will be great, also, to have a environment variable into Cypress to set the DISPLAY manually, something like
CYPRESS_DISPLAY
.Test code to reproduce
There's no code because it fails at pipeline time when showing the info, so...
Cypress Version
8.3.1
Other
No response
The text was updated successfully, but these errors were encountered: