Issue - Registration of service worker in microsoft edge

Not reproducible Issue #21647898

Details

Author
Parambir S.
Created
May 16, 2019
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Hi guys,

I am facing issue to register service worker in microsoft edge, while it successfully registered on other browser. It also unable to register service worker for other websites as well. Can you please suggest me window or edge settings, so i can allow it to register service worker.

I used below code to register service worker:

navigator.serviceWorker.register(‘/lp_sw.js’).then(function (reg) {
console.log('[SW] Service worker has been registered’);
}, function (e) {
console.error(e);
});

Error i got for this is: “InvalidArgument”


It will be really heplful for us.

Thanks

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Zachariah L.”

    • Hi Parambir!

      Thank you for contacting us about this issue! I tested the code you provided and I received the error you are describing. It would seem as if this is in reference to the .js file not existing as I received similar issues on both Chrome and Firefox. Are you getting any errors on browsers other than Microsoft Edge?

      Thanks,
      Zach

    • Hi Zach,

      Thanks for reply.

      File ‘lp_sw.js’ is available on our server and is working fine on chrome and mozilla. Enen it is working fine on edge 44.17763. But same code is showing error of "InvalidArgument", when it execute on another 2 window 10 systems with same version of edge browser. The main thing is that service worker sucessfully registered for mozilla and chrome on same window 10 system. Is there any settings that block edge browser to register service worker.

    • Hi Parambir!

      I have seen this method using ajax function properly on the most recent build of Microsoft Edge: https://pastebin.com/GyFTsYGp. Perhaps this can be a work around for you.

      In order for me to verify a bug, I have to be able to reproduce the problem locally. Is there a link to the site where this can be viewed?

      Thanks,
      Zach

    • Hi Zachariah,

      Thansk for reply.

      Our url is https://seynd.com/demo

      If you can click on Try It button, it will register service worker. It is working fine on some edge browser as well. But on our 3 window systems, it shows invalidArgument error.

      Also i need to clear, why Service work option is not showing in “about:flags”
      Someone told me you can enable service worker there. He sent em screenshot, but on our browser the same option is not showing.

      Thanks

    • Hi Parambir!

      Using the site you sent me, it would appear the service worker was registered on 

      Microsoft Edge 44.18362.1.0 Microsoft EdgeHTML 18.18362 because in the console I did not receive the error but instead the message "service worker has been registered
      ". This is using a 3 screen system as defined in your last comment.

      This flag has likely been removed in recent builds of the browser. Flags tend to exist while a feature has not been fully implemented. Its absence suggests that this feature has been fully written into the browser. It is likely that your colleague is running an older version of Microsoft Edge. Can you confirm their version? 

      Thanks,
      Zach

    • Hi Parambir!

      For now, I will resolve this issue as "Not Reproducible". If you are still experiencing this problem then please feel free to reopen this issue with the information requested and I will resume my investigation.

      Thanks,
      Zach

    • Microsoft Edge Team

      Changed Status to “Not reproducible”

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

    Sign in