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

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. #737

Closed
max-crypt opened this issue Nov 28, 2020 · 13 comments · Fixed by #739
Closed

Comments

@max-crypt
Copy link

I'm on Debian 10. When I try to run joinmarket-qt.py I get the following error.

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.
@AdamISZ
Copy link
Member

AdamISZ commented Nov 28, 2020

Linking this, not because your problem is solved, but at least to give the context of my answer: https://old.reddit.com/r/joinmarket/comments/k1w2io/error_when_trying_to_install_joinmarket_on_debian/

Edit: perhaps that ldd command might help, also perhaps look into whether there is a different prescribed method for installing xinerama. For my part I will try to do a completely clean install on a Debian 10 VM tomorrow if possible, also I have reached out on IRC to see if anyone can report whether they get the same error.

@max-crypt
Copy link
Author

max-crypt commented Nov 28, 2020

I installed xinerama in different ways, but got the same error.

What file should I run ldd on?

EDIT: When I the following from the root directory I get no results. Is this a possible indication of the problem?

sudo find . -name "*libqxcb"
sudo find . -name "*libxcb"
sudo find . -name "*xinerama"

@max-crypt
Copy link
Author

Here is the output when I run export QT_DEBUG_PLUGINS=1

QFactoryLoader::QFactoryLoader() checking directory path "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqminimal.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqminimalegl.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqoffscreen.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqvnc.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archreq": 0,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwebgl.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqwebgl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "webgl"
        ]
    },
    "archreq": 0,
    "className": "QWebGLIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so"
Found metadata in lib /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() looking at "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libxcb-xinerama.so.0.0.0"
"Failed to extract plugin meta data from '/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libxcb-xinerama.so.0.0.0'" 
         not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/home/user/joinmarket-clientserver/jmvenv/bin/platforms" ...
Cannot load library /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)"
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)

@AdamISZ
Copy link
Member

AdamISZ commented Nov 28, 2020

Yes, as per that last entry, Cannot load library /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory) - that's the shared library that's failing to load, that's why i did ldd libqxcb.so from within that directory, saw in the output which dependency was missing (xinerama) and reinstalled it. Perhaps the name of what is missing, or what is missing, is different in your case.

@max-crypt
Copy link
Author

max-crypt commented Nov 28, 2020

Yes, as per that last entry, Cannot load library /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory) - that's the shared library that's failing to load, that's why i did ldd libqxcb.so from within that directory, saw in the output which dependency was missing (xinerama) and reinstalled it. Perhaps the name of what is missing, or what is missing, is different in your case.

How do I reinstall it? Because I tried sudo apt install --reinstall libxcb-xinerama0 and that didn't fix the problem. Additionally, I checked /home/user/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforms/ and libqxcb.so is there.

@AdamISZ
Copy link
Member

AdamISZ commented Nov 28, 2020

(To be clear, I don't expect you to do any of this, but since you're asking, I guess you want to try, at least): Well but ldd should show the exact *.so shared object that the operating system is not able to locate; it'll show a long list of them and there should be at least one that says 'not found' or similar (I forget the exact text). If it is indeed libxcb-xinerama0 that's the culprit, then my sudo apt install --reinstall .. was just what I found I had to do on that Ubuntu 1804VM, it might be different on Debian 10, I'm not sure.

@AdamISZ
Copy link
Member

AdamISZ commented Nov 28, 2020

I am working on this now, not finished, but to update you:

First, I set up a clean Debian 10 Buster VM and started a fresh JM installation. I encountered the same error as before (and as you), and did ldd on the libqxcb.so, here is the output: https://pastebin.com/kaL72Lr2 - you'll note that there are now two not found messages - basically libxcb-xinerama0 and also libxcb-util.so.1 as you noted. That second one is a new missing dependency from last time I did this. More on that in a minute.

Once I realised there was a second one missing, I decided to do more searching, and I came across these two threads:

https://bugreports.qt.io/browse/QTBUG-84749 - talks about the problem with xinerama - this was started in June, exactly when I hit the problem, but there is a long discussion here, illustrating that this change broke a lot of Qt apps.

https://bugreports.qt.io/browse/QTBUG-88688 - this thread I think started only a few days ago, about the ~util file, and how the problem seems to have gotten worse.

These problems cropped up, it seemed, with PyQt5.15 , now to complicate it further, we use a wrapper library PySide2 on top of PyQt but it basically follows the Qt versions.
Essentially, some change in packaging of PyQt from 5.15 onwards has created external dependencies which it seems several Linux systems don't meet, or in any case, not out of the box, producing these extremely obscure linker errors which users cannot possibly be expected to fix (several messages in the first of those threads make that point).

I am now testing pinning PySide2 to 5.14.2 as we already pinned PyQt to 5.14.2. I think it will fix it.

@AdamISZ
Copy link
Member

AdamISZ commented Nov 28, 2020

Indeed, as expected, that fixed it @max-crypt .. I will prepare a PR, but you can do this directly:

open joinmarket-clientserver/requirements/gui.txt, replace PySide2 with PySide2==5.14.2, then delete jmvenv and re-run ./install.sh and select the gui option, of course. After that it loads without further changes on my Debian 10 VM.

@max-crypt
Copy link
Author

Replacing PySide2 with PySide2==5.14.2 in joinmarket-clientserver/requirements/gui.txt fixed it.

Thanks Adam.

@AdamISZ
Copy link
Member

AdamISZ commented Nov 28, 2020

No worries, reopening this because it will be fixed by #739

@Ghesmati
Copy link

I installed Joinmarket 0.8.1 on Linux VM machine and I got error while trying to open Joinmarket-QT by python joinmarket-qt.py

File "joinmarket-qt.py", line 29, in <module>
    from PySide2.QtGui import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

I also checked gui.txt and it is filled by PySide2==5.14.2.

@AdamISZ
Copy link
Member

AdamISZ commented Feb 28, 2021

Hi,

Linux VM machine

Could you be more specific re: distro/operating system? (and also VM software you're using e.g. virtualbox or other)

@Ghesmati
Copy link

Hi, thanks for the reply.

Virtualization: kvm
Operating System: Ubuntu 20.04.2 LTS
Kernel: Linux 5.4.0-65-generic
Architecture: x86-64

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

Successfully merging a pull request may close this issue.

3 participants