This application failed to start because no Qt platform plugin could be initialized
-
I read several posts about this topic here and in other websites, but most were about the older versions of QT. I tried to apply them but whit no results. I also tried to reinstall QT and to update whatever I can update.
The full message I receive is the following:
=========
(base) ProOne:Dashboard adrianosavi$ export QT_DEBUG_PLUGINS=1(base) ProOne:Dashboard adrianosavi$ /Users/adrianosavi/opt/anaconda3/bin/python "/Users/adrianosavi/OneDrive/Offline Files/Savio Shandong/IT/Dashboard/test.py"
QFactoryLoader::QFactoryLoader() checking directory path "/Users/adrianosavi/opt/anaconda3/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"cocoa"
]
},
"className": "QCocoaIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("cocoa")
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqminimal.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqminimal.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqoffscreen.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqoffscreen.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() checking directory path "/Users/adrianosavi/opt/anaconda3/bin/platforms" ...
Cannot load library /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib: (dlopen(/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/libQt5PrintSupport.5.dylib
Referenced from: /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib
Reason: image not found)
QLibraryPrivate::loadPlugin failed on "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib" : "Cannot load library /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib: (dlopen(/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/libQt5PrintSupport.5.dylib\n Referenced from: /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib\n Reason: image not found)"
qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" 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: cocoa, minimal, offscreen.
Abort trap: 6
====================
I hope I can receive support for this issue.
-
@jsulm said in This application failed to start because no Qt platform plugin could be initialized:
libQt5PrintSupport.5.dylib
In my mac, I have /Users/adrianosavi/opt/anaconda3/lib/libQt5.archive.zip and inside this there is libQt5PrintSupport.5.dylib, this is the only place where I can find libQt5PrintSupport.5.dylib
It seems it has not been installed. How to install it?
-
@adsavi said in This application failed to start because no Qt platform plugin could be initialized:
How to install it?
How did you install other Qt parts?
-
@jsulm said in This application failed to start because no Qt platform plugin could be initialized:
config.log
the config.log text is:
====
executing config test gypsy
- cd /Users/adrianosavi/qtlocation/config.tests/gypsy && /Users/adrianosavi/qtbase/bin/qmake -spec /Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtbase/mkspecs/macx-clang "CONFIG -= qt debug_and_release app_bundle lib_bundle" /Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/gypsy
- cd /Users/adrianosavi/qtlocation/config.tests/gypsy && MAKEFLAGS= make
/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -fno-exceptions -Wall -Wextra -fPIC -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/gypsy -I. -I/Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtbase/mkspecs/macx-clang -o .obj/main.o /Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/gypsy/main.cpp
/Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/gypsy/main.cpp:29:10: fatal error: 'gypsy/gypsy-satellite.h' file not found
#include <gypsy/gypsy-satellite.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [.obj/main.o] Error 1
test gypsy FAILED
executing config test winrt- cd /Users/adrianosavi/qtlocation/config.tests/winrt && /Users/adrianosavi/qtbase/bin/qmake -spec /Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtbase/mkspecs/macx-clang "CONFIG -= qt debug_and_release app_bundle lib_bundle" /Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/winrt
- cd /Users/adrianosavi/qtlocation/config.tests/winrt && MAKEFLAGS= make
/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -fno-exceptions -Wall -Wextra -fPIC -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/winrt -I. -I/Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtbase/mkspecs/macx-clang -o .obj/main.o /Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/winrt/main.cpp
/Users/adrianosavi/Downloads/qt-everywhere-src-5.15.1/qtlocation/config.tests/winrt/main.cpp:30:10: fatal error: 'windows.system.h' file not found
#include <windows.system.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [.obj/main.o] Error 1
test winrt FAILED====
It seems the configuration failed.
But I was able to go on with the following steps.
What do you suggest to me? -
@adsavi said in This application failed to start because no Qt platform plugin could be initialized:
What do you suggest to me?
What I already suggested: check the config.log file to see whether PRINTING support was activated or not. The failed checks are related to QtLocation module and do not have anything to do with printing...
-
@jsulm I installed QT again and now I did not have any problem with the installation and the installation log shows no problem.
There is not printing support issues but now the message I receive is this:
===========
QFactoryLoader::QFactoryLoader() checking directory path "/Users/adrianosavi/opt/anaconda3/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"cocoa"
]
},
"className": "QCocoaIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("cocoa")
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqminimal.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqminimal.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqoffscreen.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqoffscreen.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() checking directory path "/Users/adrianosavi/opt/anaconda3/bin/platforms" ...
Cannot load library /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib: (dlopen(/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/libQt5PrintSupport.5.dylib
Referenced from: /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib
Reason: image not found)
QLibraryPrivate::loadPlugin failed on "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib" : "Cannot load library /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib: (dlopen(/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/libQt5PrintSupport.5.dylib\n Referenced from: /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib\n Reason: image not found)"
qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" 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: cocoa, minimal, offscreen.
Abort trap: 6
=====
What is the next step you suggest?
-
-
@adsavi said in This application failed to start because no Qt platform plugin could be initialized:
installed today
How? Using online installer? Does it have libQt5PrintSupport.*.dylib?
libQt5PrintSupport.5.9.7.dylib - this is a different version -
@adsavi said in This application failed to start because no Qt platform plugin could be initialized:
there are no other dylib files beginning with libQt5PrintSupport
This is strange, it should be there.
Maybe somebody else knows, I'm not a Mac user. -
Hi,
There's something fishy here. It looks like your have installed Qt using conda. I suspect it came with PySide2. Is that the case ?
Now if you used the online installer, how are you running your application ?