circleci-orb icon indicating copy to clipboard operation
circleci-orb copied to clipboard

Sporadic "Missing X server or $DISPLAY"

Open MikeMcC399 opened this issue 4 months ago • 7 comments

Current behavior

Cypress verification in CircleCI jobs sporadically fails with a "Missing X server or $DISPLAY" error. Re-running the job generally recovers from the error.

Desired behavior

Cypress verification in CircleCI jobs should not fail with a "Missing X server or $DISPLAY" error.

Test code to reproduce

This is a sporadic issue, not a hard error that always occurs. It has been observed running .circleci/test-deploy.yml in this repo.

Cypress Version

14.3.2

Node version

v22.15.0 LTS

Operating System

Ubuntu 22.04.2 LTS docker.io/cimg/node:22.15.0-browsers

Logs

An example log is https://app.circleci.com/pipelines/github/cypress-io/circleci-orb/2089/workflows/81e47d76-d64e-4b26-a54e-7d96ffd38626/jobs/9077

Cypress failed to start.

This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies

Please refer to the error below for more details.

----------

[220:0616/212755.163287:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[220:0616/212755.757734:ERROR:ozone_platform_x11.cc(245)] Missing X server or $DISPLAY
[220:0616/212755.757747:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.

----------

Platform: linux-x64 (Ubuntu - 22.04)
Cypress Version: 14.3.2

Exited with code exit status 1

Other

This issue has also been previously reported in

  • https://github.com/cypress-io/cypress/issues/31484
  • https://discuss.circleci.com/t/xvfb-frequently-fails-to-start-with-browsers-convenience-image/53164

cc: @JeremieDoctrine

MikeMcC399 avatar Jun 17 '25 10:06 MikeMcC399