QtWebView runs from editor, crash after windeployqt



  • Hi,

    I have an app that runs on Windows, Mac, Android and iOS, there is an OAuth2 login page for which I use QtWebView given that it needs to run on all these platforms. I am not sure which category is the best one to put this question in, I put it here because I found other QtWebView questions posted here.
    Works on Android and iOS, works on Windows and Mac when running from Qt Creator.
    Now I am trying to make a Windows distributable version. The app works perfectly but when I load the qml page that has the webview it crashes. Debug version gives me this message:
    [...]
    Module: 5.7.1
    File: global\qglobal.cpp
    Line: 3081
    ASSERT: "webEngineView" in file qwebview_webengine.cpp, line 219

    I just ran windeployqt and that seemed to be all I need to do, also I have added OpenSSL 1.0.2j, libeay32.dll and ssleay32.dll are present, don't see what could be wrong but I thought I'd mention it.
    I don't know where to look for the solution to this. Hope you can help!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you check with Dependency Walker whether you had all direct dependencies deployed ?



  • @SGaist OK, it is showing a ton of API-MS-WIN-..., EXT-MS-WIN... DLLs as question marks, file not found.
    It also shows SHCORE.DLL, SHLWAPI.DLL and IEFRAME.DLL as red icons, IEFRAME sounds very relevant but beyond these having a red icon I can't see what's wrong. I am not familiar with dependency walker.

    edit: http://stackoverflow.com/questions/36240215/dependency-walker-missing-dlls
    As well as all of the ones mentioned on that page I also have EXT-MS-MF-PAL-L2-1-0.DLL and a bunch of EXT-MS-ONECORE-... DLLs showing as yellow, not found. I would guess that they are also not a problem.
    And elsewhere I found that those 3 red DLLs are also not an actual problem. Everything else shows up as ok.


  • Lifetime Qt Champion

    Did you check that the network plugins were properly deployed ?



  • I'm pretty sure they're all present and there is no error that it could not load a library. The OAuth2 network requests I do before the login page, using QNetwork classes, go through fine.
    I have Qt5WebView.dll, Qt5WebEngineCore.dll, Qt5WebEngine.dll, Qt5WebChannel.dll, Qt5Network.dll, and QtWebEngineProcess.exe, as well as a QtWebView folder that has declarative_webview.dll, plugins.qmltypes and qmldir.
    On mac I had another issue but after solving it I can run it and it crashes the same way. The framework equivalents of those dlls are present, just no equivalent for the exe or folder.

    This is the console output when opening the qml that has the webview:
    QQmlComponent: Component is not ready
    QObject::connect: invalid null parameter
    QObject::connect: invalid null parameter
    QObject::connect: invalid null parameter
    QObject::connect: invalid null parameter
    Segmentation fault: 11

    Edit: I found a QtWebEngine folder similar to the QtWebView folder that was deployed by default, I copied it to my destination folder, on mac I found the same folder and put it in Contents/Resources/qml. That solved it for both platforms.



  • @karelc I had the same issue with Qt 5.8 on Windows, had to add QtWebEngine manually too. Is there a bug report for that one ?


  • Lifetime Qt Champion

    @mabeghin Hi and welcome to devnet,

    IIRC, you can pass -qt_module_name to windeployqt to add additional modules. In your case -webengine.

    Hope it helps


Log in to reply