Presence of DISPLAY env var causes "Cypress failed to start"
See original GitHub issueCurrent behavior:
- Have
DISPLAY
env var set cypress run
:
Verifying Cypress can run /root/.cache/Cypress/3.2.0/Cypress [failed]
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.2.0/Cypress/Cypress --smoke-test --ping=177
----------
Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 3.2.0
Desired behavior:
cypress run
runs regardless of presence of DISPLAY
variable.
Steps to reproduce: (app code and test code)
- Stock Cypress Docker image.
- Running on Semaphore 2.0
--config baseUrl=www.example.com
This was working until a few days ago when we started observing Cypress failed to start
.
Inspecting logs we noticed that Semaphore had began injecting a DISPLAY
env var. We reached out to Semaphore and they confirmed:
Thanks for reporting this.
The $DISPLAY=:99 change was introduced two days ago as a part of improvements and fixes activities. This change helps with some workflows that are using Selenium/Chrome combination. Since this positively affected a given group of our users, we introduced this change.
I shared this message with the platform team and we will let you know as soon as we have any new information. Until then, please use the workaround you described.
Thanks for your patience.
Versions
- Stock Cypress Docker image
npm install
Cypress 3.2.0- Running on Semaphore 2.0 using Docker image (per Semaphore docs)
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top GitHub Comments
Work around is to
unset DISPLAY
prior tocypress run
.Also identified on https://github.com/cypress-io/cypress/issues/1556#issuecomment-418069209
Cypress spins its own XVFB server if there is no
DISPLAY
variable, to see this in actionYou should see Cypress messages
But if this variable is set to something else, let’s say
:100
then verification failsWorse, if we just run tests, then the process fails silently
That’s it, there is no more output.