question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Service Worker Fails to Register

See original GitHub issue

Describe the bug

When loading our app, we get the following error:

[MSW] Failed to register Service Worker (/mockServiceWorker.js).
message: [Exception: TypeError: Illegal invocation at DOMException.invokeGetter (<anonymous>:1:142)]

Environment

  • msw: 0.15.9
  • nodejs: 10.15.0
  • npm: 6.13.16

Browser: Chrome v81.0.4044.138 (Official Build) (64-bit)

Expected behavior

We’ve tried a number of fixes, but nothing has prevented the above error.

Any insight is greatly appreciated!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sjlutterbiecommented, May 14, 2020

Hi @kettanaito, we’re still investigating this on our end and, until we can say otherwise, assume it’s due to the specifics of our app. Please don’t let it be a blocker to #104 or other issues… we’ll reach out when we have more information. Thank you 😃

0reactions
sjlutterbiecommented, Jan 23, 2022

Hi Nikhil,

I’m afraid I don’t remember the specifics, nor do I have access to the specific environment, anymore. I can say we were using neither Next.js nor local-ssl-proxy, however, so I don’t know how much our solution would applied to your situation.

Sorry I can’t be of more help!

Simon

On Thu, Jan 20, 2022 at 10:25 PM Nikhil Bhandarkar @.***> wrote:

Hey @sjlutterbie https://github.com/sjlutterbie, I am also trying to use MSW with local SSL config (Next js and local-ssl-proxy). Can you provide any details on how you made it work? Thanks 😃

— Reply to this email directly, view it on GitHub https://github.com/mswjs/msw/issues/157#issuecomment-1018218338, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ37PHP3K64LXL7XG5LELLUXD35FANCNFSM4NAIEOGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service Worker Registration Failed - Stack Overflow
I am currently working on service worker to handle push notification in browser. Currently I am having this "SW registration failed error":.
Read more >
Service Worker registration failed with TypeError ... - GitHub
My application is not able to register the serviceworker and I am receiving the error that it's not finding the sw.js file.
Read more >
Manifest V3 service worker registration failed - Google Groups
When the worker throws an error during its first execution task, it can't be registered and can't be opened to inspect the error...
Read more >
Error Failed to register a ServiceWorker - WordPress.org
Hi,. I have set up a Web Push Platforms application with WordPress in my OneSignal account, but I have a problem when displaying...
Read more >
1429714 - serviceWorker registration fails on many pages ...
Actual results: The registration of ServiceWorkers fails in many cases with the error "The operation is insecure.", even if the same Service Worker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found