dom-examples icon indicating copy to clipboard operation
dom-examples copied to clipboard

Chrome console error using default demo

Open 892206 opened this issue 2 years ago • 4 comments

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?

892206 avatar Jun 20 '22 20:06 892206

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.

schalkneethling avatar Aug 11 '22 19:08 schalkneethling

I am also getting this error.

SystemDisc avatar Aug 30 '23 19:08 SystemDisc

I was able to reproduce the error:

  1. Check out [email protected]:mdn/dom-examples.git
  2. Go to the example: cd service-worker/simple-service-worker
  3. Start local server npx lite-server
  4. Open demo in Chrome
  5. Check console for errors (empty)
  6. Wait a bit, reload a few times:

Image

There’s also another one:

Failed to execute 'put' on 'Cache': Request method 'POST' is unsupported

pepelsbey avatar Nov 23 '23 13:11 pepelsbey

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.

sidewayss avatar Feb 03 '24 13:02 sidewayss