This repository has been archived by the owner. It is now read-only.

QXcbConnection: Could not connect to display #14240

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

Comments

Projects
None yet
4 participants
@samcontesse

samcontesse commented Apr 27, 2016

  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

This comment has been minimized.

Show comment
Hide comment
@Vitallium

Vitallium Apr 27, 2016

Collaborator
  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)

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

This comment has been minimized.

Show comment
Hide comment
@samcontesse

samcontesse Apr 27, 2016

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

samcontesse commented Apr 27, 2016

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

@zackw

This comment has been minimized.

Show comment
Hide comment
@zackw

zackw Apr 27, 2016

Collaborator

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.

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@Vitallium

Vitallium Apr 27, 2016

Collaborator

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

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

This comment has been minimized.

Show comment
Hide comment

hashar commented Nov 28, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.