JavaScript/Firefox: "Failed to register/update ServiceWorker", when nothing called ServiceWorker is in use

Viewed 3124

Here's a weird one.

I'm developing a Django/Bootstrap 3 web application, and recently I've started receiving this error in the JavaScript console:

Failed to register/update a ServiceWorker for scope ‘http://localhost:8000/’: Load failed with status 404 for script ‘http://localhost:8000/service-worker.js’

The funny thing is that I'm not actually attempting to use anything called ServiceWorker or service-worker.js and never have. I don't know what it's supposed to do. I do develop many other websites on localhost:8000 though, so I'm guessing it's some kind of left-overs from a different project.

The error does NOT show up when I try browsing in private mode, further implying that this is some kind of browser memory.

Still, I've reloaded with Ctrl-Shift-R and Shift-F5, and cleared all cookies for localhost. I've searched both my own code, as well as the entire Python environment for the strings service-worker.js and ServiceWorker but found nothing.

I'd really appreciate help with two things:

  1. Learn what can cause this sort of thing.
  2. Get rid of the error itself.

I'm using Firefox 64, Django 2.0.10 (with Django Debug Toolbar 1.9.1) with Bootstrap 3.3.7 on Ubuntu 18.04.

(Not even sure how to tag this thing, because I don't know what I'm dealing with.)

1 Answers

Type about:debugging#workers in Firefox bar. Find Service Worker for localhost and click unregister. It should helps if it is really leftover.

What it is?

Here, you can read about Service Workers, it has nothing to do with django or bootstrap. As far as I know, Bootstrap doesn't have service workers.

Related