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

[QWebEngineView] setHtml with custom baseUrl crashes WebSockets (regression)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.9.1
    • WebEngine
    • None

    Description

      In Qt 5.9.1 and possibly 5.9.0, passing a custom (non-standard) baseUrl value to setHtml will cause any usage of WebSockets to crash the presentation engine with a series of message starting with VALIDATION_ERROR_DESERIALIZATION_FAILED, shutting down the web engine and preventing any further processing or setting of html data. Note this only seems to affect WebSockets; loading of files and etc seems to work correctly.

      In prior versions this worked correctly, allowing for the use of a QWebEngineUrlSchemeHandler to handle custom schemes (such as loading images or files from a database if the scheme was "foobar").

      Steps to test:

      Use the minimal example from the webenginewidgets source tree. Modify the view.setUrl line to not load qt.io but to instead read the contents of a local disk file (see attached) and use view.setHtml with the loaded string. Note the web sockets test code working. Change the setHtml to have a QUrl("foobar:/") base url and run again; this will cause the IPC to fail and stop all further html processing.

      The attached file is from https://www.websocket.org/echo.html copied from their example code.

       

      Attachments

        Issue Links

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

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              tcwilson tcwilson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes