dom-examples
dom-examples copied to clipboard
Chrome console error using default demo
Example: service-worker/simple-service-worker
I tried the demo and got the following error after couple of refreshes:
The service worker navigation preload request was cancelled before 'preloadResponse' settled. If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to settle.
and as second error:
Uncaught (in promise) DOMException: The service worker navigation preload request was cancelled before 'preloadResponse' settled. If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to settle.
after I watched the github demo I saw the same problem. How could this be resolved?
Hey @892206! Thank you for opening this issue. We are combining some of our repositories to enable us to triage pull requests and issues more effectively. Therefore, this specific repository will be merged into the more prominent dom-examples repository. I will transfer this issue to this new repo for further discussion.
I am also getting this error.
I was able to reproduce the error:
- Check out
[email protected]:mdn/dom-examples.git
- Go to the example:
cd service-worker/simple-service-worker
- Start local server
npx lite-server
- Open demo in Chrome
- Check console for errors (empty)
- Wait a bit, reload a few times:
There’s also another one:
Failed to execute 'put' on 'Cache': Request method 'POST' is unsupported
This is a Chrome bug filed last March: https://bugs.chromium.org/p/chromium/issues/detail?id=1420515 Not even assigned yet, so don't hold your breath for a fix. And don't bother trying to fix this demo app.
I opened a PR to add a comment about this bug in the code: https://github.com/mdn/dom-examples/pull/253.