ilan-schemoul / meteor-service-worker

An universal service worker for meteor apps
MIT License
137 stars 26 forks source link

Uncaught (in promise) TypeError: Request failed #4

Closed sandrich closed 7 years ago

sandrich commented 7 years ago

Hi

I tried to add sw.js into my project but get the following error in the console

Failed to load resource: the server responded with a status of 401 (Unauthorized)
:3000/sw.js:1 Uncaught (in promise) TypeError: Request failed
sw.js:1 Service Worker termination by a timeout timer was canceled because DevTools is attached.

Anyone know how to fixt this?

ilan-schemoul commented 7 years ago

Sorry but I don't see how a 401 error could be related to the SW. Maybe try to debug by adding after

self.addEventListener('fetch', (event) => {
  console.log('Handling fetch event for', event.request.url);
});

And see which url leads to 401.

sandrich commented 7 years ago

Hi. I close this issue. It was due to Kadira. The error cleared after getting rid of kadira.

ilan-schemoul commented 7 years ago

All right, I use Kadira w/o any kind of problem for now tough