Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

QXcbConnection: Could not connect to display #14240

Closed
samcontesse opened this issue Apr 27, 2016 · 5 comments
Closed

QXcbConnection: Could not connect to display #14240

samcontesse opened this issue Apr 27, 2016 · 5 comments

Comments

@samcontesse
Copy link

  1. Which version of PhantomJS are you using?
    Version 2.1.1
  2. What steps will reproduce the problem?
    1. Open a shell
    2. Type phantomjs
    3. Press enter
  3. Which operating system are you using?
    Ubuntu 16.04 LTS
  4. Did you use binary PhantomJS or did you compile it from source?
    Binary from the official Ubuntu repository - version 2.1.1+dfsg-1
  5. Please provide any additional information below.
    This is a fresh install, no X11 library has been installed (headless).
QXcbConnection: Could not connect to display 
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
Aborted
@vitallium
Copy link
Collaborator

vitallium commented Apr 27, 2016

  1. We don't support official packages from repositories for distros. Because they are usually modified. Like this one.
  2. List of dependencies for this package contains excess packages that are not needed to build PhantomJS:
libjs-coffeescript
libx11-dev,
libxext-dev,
libqt5webkit5-dev

If you compiled PhantomJS with X11 enabled, it will use XCB (X11) platform in runtime, which is not supported in headless environment. Instead of that you must build PhantomJS without X11 headers (dev packages installed)

@samcontesse
Copy link
Author

Thank you for your help. The official Linux 64-bit build works as expected.

@zackw
Copy link
Contributor

zackw commented Apr 27, 2016

For future reference, this sort of breakage is caused by compiling PhantomJS against a system-supplied QtBase instead of our bundled version. The bundled version has been substantially modified; one of the changes is to avoid pulling in X11 libraries.

@vitallium
Copy link
Collaborator

vitallium commented Apr 27, 2016

@zackw for future reference, Qt 5.6 bundled with offscreen platform, which we can be used in PhantomJS to build against system-supplied Qt. :-)

@hashar
Copy link

hashar commented Nov 28, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants