Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-24072

Qt for WebAssembly: Run configuration is broken for Qt 5.15

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.12.2
    • Qt Creator 4.12.0, Qt Creator 4.12.1
    • All Other Issues
    • None
    • WebAssembly

    Description

      When launching a Qt for WebAssembly application, the main html document is loaded and the error message TypeError: NetworkError when attempting to fetch resource. appears. Nothing more happens

      The reason is that emrun quits quickly after the initial html page was loaded. Then, the web server it spawned, shuts down before any further wasm-app related data can be fetched by the browser.

      It seems that the behavioral change comes with the upgrade of the Emscripten SDK from 1.38.x to 1.39.x. (That upgrade is required by Qt 5.15 https://doc-snapshots.qt.io/qt5-5.15/wasm.html#install-emscripten). Adding the --serve_after_close commandline parameter to the emrun call fixes the issue, and restores the behavior of Emscripten SDK from 1.38.x, where the web server keeps running, and is only stopped when emrun is shut down by Qt Creator.

      Apparently, we are lucky that emrun of Emscripten <= 1.38.x also accepts --serve_after_close and behaves like how we need.

      Attachments

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

        Activity

          People

            portale Alessandro Portale
            portale Alessandro Portale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes