TypeError: failed to fetch

TypeError: failed to fetch

This can be caused because of browser engine doesn't detect offline state and web resources are nevertheless not fetch-able.

This could happen because of server downtime or routing problems.

In Workbox the responsible code looks like this...

        function s(t, e, i) {
            fetch(t).then((function(n) {
                404 === n.status ? (e("error", new Error("Service worker not found at " + t)),
                a()) : -1 === n.headers.get("content-type").indexOf("javascript") ? (e("error", new Error("Expected " + t + " to have javascript content-type, but received " + n.headers.get("content-type"))),
                a()) : r(t, e, i)
            }
            )).catch((function(t) {
                navigator.onLine ? e("error", t) : e("offline")
            }
            ))
        }