Default Xvfb stopped working

Sometime in the last 6 hours, Xvfb provided by the standard CircleCI images in 2.0 stopped working.

In the build itself, I get this message when trying to run Chrome:

$ echo $DISPLAY
:99
$ google-chrome
[1025:1025:0726/080756.212198:ERROR:browser_main_loop.cc(279)] Gtk: cannot open display: :99

This worked before.

Trying to run Xvfb manually:

$ Xvfb :99 -screen 0 1280x1024x24
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Using a different screen number does seem to work, e.g. Xvfb :99 -screen 1 1280x1024x24. However, it would be a pain to manually change all my current projects to do this. Also, if the default Xvfb instance starts working again, there may be conflicts.

Tested with base image circleci/node:7.8.0-browsers.
This issue started happening without the base image or the project changing, so it is most likely some issue in the host environment or build agent.

Chiming in to say I appear to be sporadically encountering this same issue using the circleci/node:6.10-browsers image.

Encountering the issue through Selenium testing as well.

Selenium::WebDriver::Error::UnknownError:
unknown error: an X display is required for keycode conversions, consider using Xvfb
(Session info: headless chrome=59.0.3071.115)
(Driver info: chromedriver=2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57),platform=Linux 3.13.0-125-generic x86_64)

I’m also running into this issue. The container has not changed at all, but now tests that previously passed are failing due to the XVFB error.

Last successful build: Build-agent version 0.0.3763-62d8c9a (2017-07-25T13:09:43+0000)
First failure: Build-agent version 0.0.3793-f06cbf5 (2017-07-26T14:29:53+0000)

1 Like

I think we’re also getting this issue. It fails when attempting to start x11vnc, which we use for debugging issues with our end-to-end tests (running Chrome).

x11vnc -forever -nopw
27/07/2017 03:10:00 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 326
27/07/2017 03:10:00 XOpenDisplay(":99") failed.
27/07/2017 03:10:00 Trying again with XAUTHLOCALHOSTNAME=localhost ...

27/07/2017 03:10:00 ***************************************
27/07/2017 03:10:00 *** XOpenDisplay failed (:99)

*** x11vnc was unable to open the X DISPLAY: ":99", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

I was able to resolve the issue by passing the arg “-crate” to x11vnc, so my config looks like this:

  - run:
      name: Install X VNC Server
      command: sudo apt-get install -y x11vnc
  - run:
      name: Start X VNC Server
      command: x11vnc -forever -nopw -create
      background: true
1 Like

Thank you for the reports.

We are looking into this and investigating what changed.

1 Like

We pushed a change just now. Can you try some new builds now?

It needs to be a new webhook from GitHub, not a rebuild of a past build.

5 Likes

Thanks, I can confirm this is working again.

1 Like

Also confirmed on my end. Thanks for the fix.

Another late confirmation that the issue is resolved for us. Thanks!