Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97392

WebEngine fails to load urls from resources



    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.11, 6.5.0 Beta1
    • 5.15, 6.2.0
    • Core: I/O, WebEngine
    • None
    • archlinux
    • Linux/X11
    • 84ebd69859 (qt/qtwebengine/dev) 84ebd69859 (qt/tqtc-qtwebengine/dev) 8c149fcbef (qt/qtwebengine/6.3) 903365f84f (qt/qtwebengine/6.4) 3d23b379a7 (qt/qtwebengine/5.15) 3d23b379a7 (qt/tqtc-qtwebengine/5.15) 8c149fcbef (qt/tqtc-qtwebengine/6.3)


      Following the changes to mime-info handling introduced by https://codereview.qt-project.org/c/qt/qtbase/+/328240, I have found that WebEngine can no longer load html urls from internal resources (i.e. using the qrc scheme). I first noticed this when the change was back-ported to 5.15.2 on my archlinux system, but it also affects 6.2.0.

      I have attached a test-case that reproduces the problem. To try it, run:

      tar -xf testcase.tar.gz
      qmake6 testcase.pro && make

      On my system, the QTextBrowser at the top displays the html, but the QWebEngineView below does not. However, if I run either of these:

      ./testcase text.html
      ./testcase qrc:/test.js

      the contents are displayed correctly in both widgets. So it seems that only html pages loaded from resources are affected by this issue. When I roll back to a Qt version without the changes introduced by the above mentioned commit, the problem goes away.

      I have already reported the problem on the archlinux tracker (https://bugs.archlinux.org/task/72366#comment202803), and it does not appear to be a packaging-related issue.


        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              qt_webengine_team Qt WebEngine Team
              kachelaqa kachelaqa kachelaqa
              0 Vote for this issue
              10 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes