cypress: Missing X server or $DISPLAY
Current behavior
I’m not sure if this is a CirlceCI issue or Cypress issue.
But we did not change our code. And we started to have issues installing cypress starting from yesterday.
We had this setup running for years.
Debug logs
It looks like this is your first time using Cypress: 14.2.1
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.
----------
[1000:0411/085404.347979: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
[1000:0411/085405.054021:ERROR:ozone_platform_x11.cc(245)] Missing X server or $DISPLAY
[1000:0411/085405.054040:ERROR:env.cc(258)] The platform failed to initialize. Exiting.
----------
Platform: linux-x64 (Ubuntu - 22.04)
Cypress Version: 14.2.1
Error: exit status 123
Error: exit status 123
Exited with code exit status 1
The pnpm installation logs looks fine
> e2e-tests-cypress@1.0.0 cypress:install:build /home/circleci/nodejs-doctrine/e2e-tests/cypress
> cypress install
Installing Cypress (version: 14.2.1)
You can now open Cypress by running one of the following, depending on your package manager:
- npx cypress open
- yarn cypress open
- pnpm cypress open
https://on.cypress.io/opening-the-app
Cypress Version
14.2.1
Node version
22.13.0
Package Manager
pnpm
Package Manager Version
10.8.0
Operating system
Linux
Operating System Version
22.04
Other
I know you probably cannot really help directly. But I want to know if I am the only one experiencing it 👀 or if other are having it.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 22 (14 by maintainers)
Yes thanks for your time and investigation
We can clearly close this issue. It’s totally unrelated to cypress
I can fix the issue somehow by forcing X to start in background.
My jobs are not failing anymore this way.
They said.
Starting X in the background is a best practice.
From their perspective, the workaround isn’t just a workaround — it’s the solution.
But I totally disagree with them 😅 maybe with the community issue this will get more traction.