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 during service worker registration: DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html')

See original GitHub issue

I created a new project using the pwa template, using vue-router in history mode, then i built it and served it using express service worker works fine in all the routes like /home or /help excpet in nested routes… Whenever i refresh my page when m on profile/dashboard it gives error

Error during service worker registration: DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type (‘text/html’)

in my console

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
Sim923commented, Apr 6, 2018

I got the same problem. Can anyone help me?

1reaction
rizkhalcommented, Nov 21, 2020

i have the same issue, any idea?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service Worker registration error: Unsupported MIME type ...
Error during service worker registration : DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html ...
Read more >
Error: Service worker has an unsupported MIME type ('text ...
by the way, the mime type error happens before the service worker has a chance to register (or even load its module code)...
Read more >
The script has an unsupported MIME type ('text/html')
I get following error: The script has an unsupported MIME type ('text/html'). service worker error DOMException: Failed to register a ...
Read more >
ServiceWorker MIME Type Error ('text/html') on register (React)
The current behavior: Service worker does not register due to the below error. The expected behavior: Service worker registers. Details.
Read more >
ServiceWorkerContainer.register() - Web APIs | MDN
The register() method of the ServiceWorkerContainer interface creates or updates a ServiceWorkerRegistration for the given scriptURL.
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