qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
Hello,
I have just started to develop Qt applications for Beaglebone Black, and when i try to deploy an app to the beaglebone black via ssh, I get the following error and the app does not run on the vnc (until unless i manually open the /opt/ directory and execute it manually):
**02:42:36: Starting /opt/textLabel_Ex/bin/textLabel_Ex...** qt.qpa.xcb: could not connect to display 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, xcb. 02:42:37: Process killed by signal
I have seen similar threads on the forum, and @SGaist suggested to run qtcreator with,
export QT_DEBUG_PLUGINS=1
followed by qtcreator.
The log for the same is here:QFactoryLoader::QFactoryLoader() checking directory path "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqeglfs.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqlinuxfb.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimal.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimalegl.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqoffscreen.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqvnc.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/home/yash/Qt5.12.1/Tools/QtCreator/bin/platforms" ... loaded library "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" loaded library "Xcursor" QFactoryLoader::QFactoryLoader() checking directory path "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platformthemes/libqgtk3.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platformthemes/libqgtk3.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "gtk3" ] }, "archreq": 0, "className": "QGtk3ThemePlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("gtk3") QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platformthemes/libqxdgdesktopportal.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platformthemes/libqxdgdesktopportal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "xdgdesktopportal", "flatpak", "snap" ] }, "archreq": 0, "className": "QXdgDesktopPortalThemePlugin", "debug": false, "version": 330752 }
And since i am facing issues with "xcb", I think these lines below needs attention:
QFactoryLoader::QFactoryLoader() looking at "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" Found metadata in lib /home/yash/Qt5.12.1/Tools/QtCreator/lib/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": 330752 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/home/yash/Qt5.12.1/Tools/QtCreator/bin/platforms" ... loaded library "/home/yash/Qt5.12.1/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" loaded library "Xcursor"
Can someone please help me with resolving the above issue? And help guide on what and how to proceed to solve the issue?
Regards,
Yash -
@jsulm
I am unable to post the entire log here because of the post word limit, so, I have saved the entire log to a txt file file with the QT_DEBUG_PLUGINS=1I hope this helps understand the problem better and maybe, help getting a solution to the issue...!
PS: I am using a 3rd party website, since I couldn't upload the file directly here.
Regards,
Yash -
@hskoglund @jsulm @SGaist
textLabel_Ex is not the only program being affected like this. The error is present while deploying any app to the Beaglebone black.Is there anything else that i can do to share some more information which can help you to understand the issue better?
Regards,
Yash -
@hskoglund
I have a cross-compile setup here, building the Qt apps on an ubuntu 20.04 LTS machine and deploying the built app to the Beaglebone Black (running Debian Bullseye distro) and checking the app working over a vnc connection.Also, the app is not running in the qtcreator app, but is copied onto the BBB's /opt/ directory and the app can be executed manually from there.
@hskoglund said in qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
a log from an unsuccessful launch of any Qt app on the Beaglebone black.
So, any particular process on how to get that particular log?
-
@hskoglund @jsulm @SGaist
Checking to see if anyone can further assist me with this issue as I am not able to debug the code from the Qt creator because of this very issue.I would be able to provide any more information needed to better understand the issue.
-
How many Qt versions do you have on your device ?
-
I meant on the device itself.
-
And it's the one you cross-compiled ?
-
When starting directly on the BBB, do you use the same backend ?
-
@SGaist said in qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
do you use the same backend ?
Same backend?? Can you tell me what backend is being asked about?
@SGaist said in qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
When starting directly on the BBB
Also I cannot directly start Qtcreator on BBB, since i don't have it installed on the BBB, and only use the cross-compilation on the ubuntu system to compile and deploy the app to the BBB (and nothing else)....don't know if that makes sense.
-
Backed: xcb, eglfs, etc.
No need for Qt Creator on your target, I meant literally starting your application on it, for example through the command line.
-
So it looks like your X server installation is incomplete to run Qt applications with the xcb backend. I would start by fixing that.