You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was debugging some intermittent failures in our tests when I noticed some strange behavior. Consider:
// start with a service worker
let reg = await navigator.serviceWorker.register(script);
await waitForState(reg.installing, "activated");
// get a controlled document to hold the worker alive
let frame = await withIframe(controlledURL);
// mark the registration as uninstalling, but it won't
// fully uninstall because of the frame
await reg.unregister();
// get the ready promise while in the uninstalling state
let readyPromise = navigator.serviceWorker.ready;
// register the service worker again, resurrecting the currently
// active worker
await navigator.serviceWorker.register(script);
// this will never resolve
await readyPromise;
It seems both firefox and chrome have this problem. I think we should resolve the ready promise if we resurrect an uninstalling registration with an active worker and matching scope.
The text was updated successfully, but these errors were encountered:
I was debugging some intermittent failures in our tests when I noticed some strange behavior. Consider:
I also wrote up a glitch to test this:
https://sw-ready-resurrection.glitch.me/
It seems both firefox and chrome have this problem. I think we should resolve the ready promise if we resurrect an uninstalling registration with an active worker and matching scope.
The text was updated successfully, but these errors were encountered: