Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

qt.network.ssl: No functional TLS backend was found ?



  • Hello !

    I am trying to "call" my с++ dll with qt 6.2.1 from python 3.9. A lot of errors:

    "qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No TLS backend is available"
    console with QT_DEBUG_PLUGINS:

    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2d.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2d.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "direct2d"
    ]
    },
    "archreq": 0,
    "className": "QWindowsDirect2DIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2d.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2dd.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2dd.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "direct2d"
    ]
    },
    "archreq": 1,
    "className": "QWindowsDirect2DIntegrationPlugin",
    "debug": true,
    "version": 393728
    }

    Got keys from plugin meta data QList("direct2d")
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimal.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimal.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimal"
    ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimal.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimald.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimald.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimal"
    ]
    },
    "archreq": 1,
    "className": "QMinimalIntegrationPlugin",
    "debug": true,
    "version": 393728
    }

    Got keys from plugin meta data QList("minimal")
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreen.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreen.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "offscreen"
    ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreen.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreend.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreend.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "offscreen"
    ]
    },
    "archreq": 1,
    "className": "QOffscreenIntegrationPlugin",
    "debug": true,
    "version": 393728
    }

    Got keys from plugin meta data QList("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindows.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindows.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "windows"
    ]
    },
    "archreq": 0,
    "className": "QWindowsIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindows.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindowsd.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindowsd.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "windows"
    ]
    },
    "archreq": 1,
    "className": "QWindowsIntegrationPlugin",
    "debug": true,
    "version": 393728
    }

    Got keys from plugin meta data QList("windows")
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/Python39" ...
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/python3.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/python3.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/python39.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/python39.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/vcruntime140.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/vcruntime140.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/vcruntime140_1.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/vcruntime140_1.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/platforms" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/Python39/platforms" ...
    loaded library "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindowsd.dll"
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2d.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2d.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "direct2d"
    ]
    },
    "archreq": 0,
    "className": "QWindowsDirect2DIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2d.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qdirect2dd.dll"
    Got keys from plugin meta data QList()
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimal.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimal.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimal"
    ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimal.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qminimald.dll"
    Got keys from plugin meta data QList()
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreen.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreen.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "offscreen"
    ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreen.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qoffscreend.dll"
    Got keys from plugin meta data QList()
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindows.dll"
    Found metadata in lib C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindows.dll, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "windows"
    ]
    },
    "archreq": 0,
    "className": "QWindowsIntegrationPlugin",
    "debug": false,
    "version": 393728
    }

    "The plugin 'C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindows.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/qwindowsd.dll"
    Got keys from plugin meta data QList()
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/Python39" ...
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/python3.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/python3.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/python39.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/python39.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/vcruntime140.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/vcruntime140.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/Python39/vcruntime140_1.dll"
    "Failed to extract plugin meta data from 'C:/Program Files/Python39/vcruntime140_1.dll'"
    not a plugin
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/platformthemes" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/Python39/platformthemes" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/networkaccess" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/Python39/networkaccess" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/tls" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/Python39/tls" ...
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No TLS backend is available
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No TLS backend is available
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/accessiblebridge" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/Python39/accessiblebridge" ...
    QQmlApplicationEngine failed to load component
    c:%5CC++%5Cfor_quik_lua535%5Cx64%5CDebug%5Cmain_window.qml: Network error


  • Moderators

    @BVladimir
    make sure OpenSSL 1.1.x libs are in the PATH or next to your executable



  • Thanks.
    But is openssl really necessary for the simplest qml window?



  • Does not work - version 1.1.1L- copied the content...\OpenSSL-Win64\lib to ...\x64\Debug where is my dll - nothing...


  • Moderators

    @BVladimir said in qt.network.ssl: No functional TLS backend was found ?:

    But is openssl really necessary for the simplest qml window?

    no, but it seems you are loading resources from secured network address (main_window.qml: Network error)

    @BVladimir said in qt.network.ssl: No functional TLS backend was found ?:

    Does not work - version 1.1.1L- copied the content...\OpenSSL-Win64\lib to ...\x64\Debug where is my dll - nothing...

    as i said make sure they are in the PATH env variable or next to your executable.



  • I don't have an exe file, just a python script calling a function from a dll. The entire openssl lib is in the directory with the dll. In the dll itself, the only code from qt:

    int argc = 1;
    const char* p1{ "C" };
    const char** argv = &p1;
    QGuiApplication app(argc, (char**) argv);
    

    QCoreApplication::addLibraryPath("C:\Program Files\OpenSSL-Win64\lib");
    QQmlApplicationEngine engine;
    const QUrl url(QStringLiteral("C:\C++\for_quik_lua535\x64\Debug\main_window.qml"));
    QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app,
    [url](QObject* obj, const QUrl& objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1);},
    Qt::QueuedConnection);
    engine.load(url);
    return PyLong_FromLong(app.exec());


  • Lifetime Qt Champion

    Hi,

    That's not the purpose of addLibraryPath. As @raven-worx already suggested the .dlls should be findable in the PATH environment variable.

    How are you starting your script ?

    How did you install Python ?

    Can you explain what your script does ?



  • addLibraryPath - just in case. env. path is set.
    py script, starting from VS 2019, python 3.9 by standard installer:

    from importlib.machinery import ExtensionFileLoader
    dll = ExtensionFileLoader('py2quik_module', r'C:\C++\for_quik_lua535\x64\Debug\for_quik_lua535.dll').load_module()

    if name == 'main':
    py_obj = dll.py2dll_obj(None)


  • Lifetime Qt Champion

    @BVladimir said in qt.network.ssl: No functional TLS backend was found ?:

    py2quik

    Would you mind explaining what exactly you are trying to load ?



  • My dll "for_quik_lua535.dll" is a Python/C extension named "py2quik_module" in python


  • Lifetime Qt Champion

    Out of curiosity, why not use PySide or PyQt since you are already working with Python ?



  • I think it will work faster in c++ - a lot of online data is planned. Python for the general scenario.


  • Lifetime Qt Champion

    What kind of data do you intend to process ?



  • Data from stock exchange terminal



  • I tried to build an exe file:

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>

    int main(int argc, char* argv[]) {
    int argc2 = 1;
    const char* p1{ "C" };
    const char** argv2 = &p1;

    QGuiApplication app(argc2, (char**)argv2);
    
    QQmlApplicationEngine engine;
    const QUrl url(QStringLiteral("qrc:tmpQML/tmpQML.qml"));
    QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
        &app, [url](QObject* obj, const QUrl& objUrl) {
            if (!obj && url == objUrl)
                QCoreApplication::exit(-1);
        }, Qt::QueuedConnection);
    engine.load(url);
    
    return app.exec();
    

    }

    Same QML:

    import QtQuick 2.12
    import QtQuick.Controls 2.12

    ApplicationWindow {

    title: "Qt Quick Controls Gallery"
    visible: true
    width: 640
    height: 480    
    

    }

    When running from VS 2019, it works fine. And does not try to search any of:

    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/networkaccess" ...

    or

    QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/6.2.1/msvc2019_64/plugins/platforms/tls" ...

    It's only with dll problem...


  • Lifetime Qt Champion

    What are going to use to process your data ?



  • The main idea is Python calls dll's that receive data and display using qt, General work with data where speed is not needed in Python


  • Lifetime Qt Champion

    Well, I must say I fail to understand your architecture here.

    What is so speed critical in your app that you need to have your UI in C++ while doing some processing in Python while the rest is done in C++ again.



  • Data from stock exchange terminal - through с++ & qt, analysis in Python.


  • Lifetime Qt Champion

    Why not load the data directly in Python using something like numpy ?



  • It is assumed that there can be over 10,000 changing values on the screen once per second. I would like to have fewer lags.


  • Lifetime Qt Champion

    If you do all the heavy lifting in Python you should benchmark the GUI as well.



  • Maybe, but if it is possible to execute all gui in native c++, wouldn't it be preferable?


  • Lifetime Qt Champion

    As I wrote: benchmark.

    Adding a layer of complexity might not be of any benefit in terms of performance, maintainability and architecture.



  • In any case, I already have a dll for getting data, and I thought it was the easiest way to use it for the gui... But with python, I'll have to do more research...


  • Lifetime Qt Champion

    Wait... you are loading the data from C++ then do processing in Python and then trying to send that back to C++ ?



  • Yes, some data for analysis in python, and some I would like to leave in c++ for gui


  • Lifetime Qt Champion

    Then wouldn't it make more sense to do it the other way around ? Since you get data through a C++ library, it would make more sense to invoke your Python code from C++ as well.



  • Well, if it is impossible to use dll for gui, then I will have to write c++ exe and provide interaction with python...


Log in to reply