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

0.2.8 TDM will not start. Could not load the Qt platform plugin "xcb" #118

Closed
SirGoodenough opened this issue Dec 30, 2020 · 12 comments
Closed

Comments

@SirGoodenough
Copy link

SirGoodenough commented Dec 30, 2020

I have previously used and installed 0.2.6, so I've done this before. The current version will just not load. It seems to be a dependency issue possibly not related directly to your code, but we need to know how to build it in order to use it...

System:

Debian 10.5 latest on bare metal. Also tried to build it within a docker Container. Same error.
Install list:

python3 -m pip install --upgrade pip
python3 -m pip install wheel
python3 -m pip install pyqt5
python3 -m pip install setuptools
python3 -m pip install tdmgr

It all installs without error, but will not run.

I have tried to load separate xcb libraries, etc, etc, but cannot get the requirement solved.

IE:

sudo apt-get --reinstall install libqt5dbus5 libqt5widgets5 libqt5network5 libqt5gui5 libqt5core5a libdouble-conversion1 libxcb-xinerama0

sudo apt-get install libqt5x11extras5

sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ /usr/bin/

export QT_DEBUG_PLUGINS=1

Here's the failing part of the error log. I will reprint the entire log below that so you can see everything else is loadiing.

, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 330499
}


Got keys from plugin meta data ("xcb")
Cannot load library /home/off/.local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/off/.local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/off/.local/lib/python3.7/site-packages/PyQt5/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
@jziolkowski
Copy link
Owner

Please have a look at issue #103 .
Anyway, xcb plugins are part of your OS and I have very little (if any) way to help with checking your configuration.

@Jason2866
Copy link
Collaborator

Closing since it is answered and not a issue from TDM

@SirGoodenough
Copy link
Author

Fine, I guess.
My point is if it doesn't load in current debian or ubuntu, the requirements should be refined so we can be successful actually loading it.
OR state what the base OS versions this requires if you believe it will actually load as-is.
A couple of us have been fighting this for days and I would not have reached out if I had another idea.
I truly believe the base OS images have migrated out from under you, and there is a missing requirement in the install. If I figure it out, I will pass it on.
I will try the link you suggest.

@jziolkowski
Copy link
Owner

I develop it on Ubuntu 20.04 so I believe I'm pretty recent. As for other platforms I simply don't have enough spare time to test every scenario. So if your investigations will lead you to a solution, I will indeed be happy to update the installation/requirements part.

@SirGoodenough
Copy link
Author

SirGoodenough commented Jan 6, 2021

Maybe a further suggestion would help me, not sure where to go here. I think we may have found the missing library.
I did find this...
https://bugreports.qt.io/browse/QTBUG-88688
Trying to figure out how to load this libxcb-util.so.1 requirement.
It is happening in scratch loaded ubuntu 20 and Debian Buster 10.5. I believe the file may be carried over on upgraded version of Ubuntu so if you dist-upgraded from 18 or 19 to 20, it probably works.
Does that help better describe the problem?

@jziolkowski
Copy link
Owner

Hehe... no more than two minutes ago this was posted: tasmota/tasmotizer#71

@jziolkowski jziolkowski reopened this Jan 6, 2021
@SirGoodenough
Copy link
Author

Adding the link worked.
I do not know how to limit pypy from using newer version.

@jziolkowski
Copy link
Owner

This I will have to fix in next release. Glad it helped.

@SirGoodenough
Copy link
Author

Enhancement request...
Where we can add the link easily, this works.
However when you are installing into a docker container and can't get into the base image to change the link, it's a problem.
TDM currently just loads the most recent version of requirements without checking if an acceptable version is already loaded. If you are trying to load a back version in order to fix an underlining OS problem in the current version, I am unable to get this going.
Perhaps if TDM checked current versions of installed. If the current version is within the range of acceptable versions, just leave it alone instead of updating it to current. Then I could load an acceptable older version and TDM would work. Now, with the current version broken of the requirement, I can load an older rev, but the TDM install just updates it, and I am SOL...
So my bare metal version gets thru the xcb issue with the added link, but my docker version I cannot get passed the xcb problem. (where the link is inaccessible)
Again, problem of the xcb is not caused by you, but I don't have a way to work around that without breaking into a Debian base image that I don't understand. (I'm not that great at docker)
Just trying to suggest things where I can to help the project.

@jziolkowski
Copy link
Owner

I will pin the PyQT requirement to the last working version without the XCB issue. Currently I'm not using any specific functions or additions that would require the latest version. However that might change in the future.

As for running TDM in docker container... It was never meant to be run like that, not to mention docker isn't really created to run such tools. If it works it works, if not, then well...

@SirGoodenough
Copy link
Author

Pinning it will fix this.
My suggestion about checking and if it's within acceptable range, don't upgrade it still stands.
Rather than always update to current.

@ThetaGamma
Copy link

One hint for the Docker enthusiasts with the "xcb" problem: try to use the VNC option in QT:
implement a
export QT_QPA_PLATFORM=vnc in your docker(-compose) file and expose and connect to port 5900 (VNC) from your container to work with TDM

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

4 participants