Web workers lose messages

Fixed Issue #9545866


Oct 26, 2016
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 4 people

Sign in to watch or report this issue.

Steps to reproduce

Microsoft Edge 38.14393.0.0.
Microsoft EdgeHTML 14.14393

Load the following test case:

<script id="worker" type="worker">
    console.log('worker created', self);

    self.addEventListener('message', function(e) {
        console.log('worker received message', e.data);
    }, false);

    // Comment out the following line to see expected behavior:
    var xhr = new XMLHttpRequest();
    var src = document.getElementById('worker').textContent;
    var blob = new Blob([src], { type: 'text/javascript' });
    var workerURL = URL.createObjectURL(blob);
    var worker = new Worker(workerURL);
    setTimeout(function () {
        console.log('posting messages to worker');
    }, 10);

Open developer tools. Refresh the page.

Expected behavior: each time you refresh the page, "worker received message 1", "worker received message 2"… is printed to the console.

Actual behavior: after refreshing the page, the worker does not receive any messages.

If you comment out the var xhr = new XMLHttpRequest(); line, it works as expected. It also works as expected in Chrome and Firefox.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Ibrahim O.”

      Changed Status to “Fixed”

    • Thank you for your feedback. We would like to inform you that this issue has been previously identified and the fix is currently available in the insider preview which will be also available in the public stable version in upcoming updates soon.  

      Best regards,
      The MS Edge Team 

    • Is this problem already solved? If not, when it will be? I have similar problems with WebWorkers. After refreshing the web app my application get no answer anymore from web worker.

    • Not solved! You should change all these with “Fixed” to “Priority/Critical” - someone needs to take stock of this XHR issue in web workers. There are numerous reports, and it’s random/difficult to reproduce but breaks everything. For now we are left no choice but to make our app treat Edge like IE with bad experience for users. Someone should also fix the indexeddb issue. MS is the only “modern” browser that does not have working support for a db (no websql and indexeddb does not work properly) and also this issue where workers can’t do the basic things we should be able to do (background load and sort out data).

    You need to sign in to your Microsoft account to add a comment.

    Sign in