-
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
Presence of DISPLAY env var causes "Cypress failed to start" #4034
Comments
Work around is to Also identified on #1556 (comment) |
Yeah, we have definitely seen this reported, but I don't recall anyone tracking down why this is occurring. Cypress has this code that checks if the OS is Looks like this is false:
https://github.com/cypress-io/cypress/blob/develop/cli/lib/exec/xvfb.js#L44 So, assuming you were running on linux and had a https://github.com/cypress-io/cypress/blob/devlop/cli/lib/exec/spawn.js#L33 I'm not sure this is relevant. ALSO, if https://github.com/cypress-io/cypress/blob/develop/cli/lib/exec/spawn.js#L141 https://github.com/cypress-io/cypress/blob/develop/cli/lib/exec/spawn.js#L66 Then I'm a bit lost as to why or where this dependencies error is thrown...which is being caught here: @brian-mann thoughts? |
Cypress spins its own XVFB server if there is no
You should see Cypress messages
But if this variable is set to something else, let's say
Worse, if we just run tests, then the process fails silently
That's it, there is no more output. |
Hmm, we need an actual X11 check there, not just
|
Need to check current |
The code for this is done in cypress-io/cypress#4165, but has yet to be released. |
Once released,
and
|
Released in |
FWIW - cypress will correctly recover from this situation and will display a warning indicating that it had to try a workaround - but otherwise this issue is completely fixed, nothing else to do. |
What does 'fix the problem' mean exactly? What is Cypress doing? |
I'm trying to run cypress using headless Chrome. When I do it, I get an error about Xvfb missing:
Am I misunderstanding how to run cypress so that Xvfb is not required? Or is Xvfb still required even to run it with headless Chrome? |
* Upgrade Cypress to v5.5.0 * Needed to unset the `DISPLAY` ENV through `config.yml` to finally make this work! (Reference: cypress-io/cypress#4034 (comment))
* Upgrade Cypress to v5.5.0 * Needed to unset the `DISPLAY` ENV through `config.yml` to finally make this work! (Reference: cypress-io/cypress#4034 (comment))
* Quarantine flaky tests (#13682) (#13683) * Quarantine flaky tests (#13682) * Add TODO note re: `describeWithToken` Co-authored-by: Nemanja Glumac * Add a circleci workflow that runs a set of Cypress smoketests (#12775) * Add a circleci nightly workflow that runs a bigger set of Cypress smoketests * Run this every hour while we're testing it, add a small fix to the admin test * Smoketests: Skip some known failing tests Co-authored-by: Ariya Hidayat <ariya@metabase.com> * Narrow down the quarantine for chart_drill spec (#13682) (#13699) * CI: Fix the cache key for uberjar for running smoketest (#13698) Smoketest for OSS edition (for now) * Fix `settings/settings.cy.spec.js` flakes (#13701) - isolated flake (`it.only("should surface an error when validation for any field fails (#4506)", () => {...})`) passed 10x (https://github.com/nemanjaglumac/metabase-tests/actions/runs/348275781) - the whole spec passed 20x (https://github.com/nemanjaglumac/metabase-tests/actions/runs/348306177) * CI: Update uberjar oss key for smoketest (#13704) * Fix Cypress flakes in `dashboard/dashboard.cy.spec.js` file (#13703) * Fix flakes in `revisions screen` block * Improve test assertions (there were some rendering problems, so I adjusted the assertions) * Narrow down the quarantine for dash_drill spec (#13682) (#13706) * Fix `metrics.cy.spec.js` flakes (#13709) * Fix `metrics.cy.spec.js` flakes (#13682) * Refactor the test using API * Smoketest: run nightly at 1am PST (#13711) 1 am PST = 09:00 UTC CircleCI cron is for UTC: https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow * Upgrade Cypress to v5.5.0 (#13674) * Upgrade Cypress to v5.5.0 * Needed to unset the `DISPLAY` ENV through `config.yml` to finally make this work! (Reference: cypress-io/cypress#4034 (comment)) * Improve `segments` tests with the use of API (#13718) * Unquarantine `scenarios/pulse/pulse.cy.spec.js` (#13727) * Unset `DISPLAY` ENV in smoketests CI group (#13732) * Unquarantine ee `custom_drill_through/drill_through.cy.spec.js` [ci skip] (#13734) * Unquarantine `question/nested.cy.spec.js` (#13733) Co-authored-by: Ariya Hidayat <ariya@metabase.com> Co-authored-by: Damon P. Cortesi <d.lifehacker@gmail.com>
Currently, cypress is failing to start in jenkins (in gerrit) due to this. For more information see cypress-io/cypress#4034 Bug: T277060
Currently, cypress is failing to start in jenkins (in gerrit) due to this. For more information see cypress-io/cypress#4034 Bug: T277060
Currently, cypress is failing to start in jenkins (in gerrit) due to this. For more information see cypress-io/cypress#4034 Bug: T277060
Current behavior:
DISPLAY
env var setcypress run
:Desired behavior:
cypress run
runs regardless of presence ofDISPLAY
variable.Steps to reproduce: (app code and test code)
--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:Versions
npm install
Cypress 3.2.0The text was updated successfully, but these errors were encountered: