I am following a simple PWA tutorial, but when I complete it I get the following console error,
Uncaught (in promise) TypeError: Failed to execute 'Cache' on 'addAll': Request failed
Here is my serviceworker file
const staticDevCoffee = "dev-coffee-site-v1"
const assets = [
"/",
"/test.html",
"/csstest/style.css",
"/jstest/app.js",
"/coffee.png",
]
self.addEventListener("install", installEvent => {
installEvent.waitUntil(
caches.open(staticDevCoffee).then(cache => {
cache.addAll(assets)
})
)
})
When I run lighthouse tests, I get this,
start_url does not respond with a 200 when offlineThe start_url did respond, but not via a service worker.
This is my first look at PWAs so I am a little stuck. I have tried several solutions I have found on SO, but none work.