Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken player - qt.qpa.pluging: Could not load the QT platform plugin "xcb" #351

Closed
PersonaN0nGrata opened this issue Aug 30, 2021 · 5 comments

Comments

@PersonaN0nGrata
Copy link

On a fresh ubuntu 20.04.3 install i have tried installing the pyrdp. I followed the install guide with pip, and the mitm is working fine. When trying to run the player however i am presented with the following issue

~/pyrdp$ pyrdp-player.py -p 3000
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

Any idea what could be the issue here? I assume something broke during the installation, but i tried running the command
pip3 install -U -e '.[full]' again, but get the same error

@PersonaN0nGrata
Copy link
Author

Ran sudo apt-get install '^libxcb.*-dev' outside the venv and now it works

@obilodeau
Copy link
Collaborator

What is your desktop environment? I have an 20.04 LTS installed but w/o a GUI for now. I will try to add the correct dependency but I don't want to add '^libxcb.*-dev' as I think it will increase our docker image significantly and only a small part of it is required.

@PersonaN0nGrata
Copy link
Author

image

@obilodeau
Copy link
Collaborator

I managed to reproduce the issue in a VM
2021-08-31_10-22 issue 351

@obilodeau
Copy link
Collaborator

Running export QT_DEBUG_PLUGINS=1 then running pyrdp-player.py again gave a good amount of helpful output including:

QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
Cannot load library /home/vagrant/pyrdp/venv/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/vagrant/pyrdp/venv/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/vagrant/pyrdp/venv/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"

If I install libxcb-xinerama0 then the pyrdp-player.py starts working. This dependency is only a few kilobytes so I see no problem adding it.

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

No branches or pull requests

2 participants