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

XMLHttpRequest.status always 0 in wasm

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.15.0
    • None
    • WebAssembly

    Description

      My JS/QML code makes a simple XMLHttpRequest like this:

      var xhr = new XMLHttpRequest();
      xhr.onreadystatechange = () => {
          if (xhr.readyState === 4) {
              // here I examine xhr.status
          }
      };
      xhr.open("GET", "https://somewhere", true);
      xhr.responseType = "json";
      xhr.send(null);
      

      Which works great on desktop Linux, but when compiled for WebAssembly, xhr.status is always 0 inside the if condition in the code.

      Other values (such asĀ xhr.responseText) are set correctly.

      Attachments

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

        Activity

          People

            lpotter Lorn Potter
            lubosd Lubos Dolezel
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes