Web workers lose messages

Fixed Issue #9545866


Oct 26, 2016
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 3 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.

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

    Sign in