workbox
workbox copied to clipboard
[workbox-window] "Installing" event not firing
Library Affected: workbox-window
Browser & Platform: all browsers
Issue or Feature Request Description: When registering a service worker, im trying to detect the start of installation (precaching) using the "installing" event. All other events are working correctly like "installed", "activating", "activated"
Code:
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
const wb = new Workbox("/service-worker.js");
wb.addEventListener("installing", (event) => {
console.log("installing", event);
});
wb.addEventListener("installed", (event) => {
console.log("installed", event);
});
wb.addEventListener("activating", (event) => {
console.log("activating", event);
});
wb.addEventListener("activated", (event) => {
console.log("activated", event);
});
console.log(wb);
wb.register();
// }
});
}
...
new WorkboxPlugin.GenerateSW({
// these options encourage the ServiceWorkers to get in there fast
// and not allow any straggling "old" SWs to hang around
clientsClaim: true,
skipWaiting: true,
//include the generated css and js files
maximumFileSizeToCacheInBytes: 11000000,
}),
...
How can i detect that there is an update available and that it started pre caching the necessary files?

Same problem for me
Hi there,
Workbox is moving to a new engineering team within Google. As part of this move, we're declaring a partial bug bankruptcy to allow the new team to start fresh. We realize this isn't optimal, but realistically, this is the only way we see it working. For transparency, here're the criteria we applied:
- For PRs, we closed everything that doesn't target the current
v7
branch. - For Issues, we closed everything that was created before 2024.
Thanks, and we hope for your understanding! The Workbox team