Service worker is not installing anymore after chrome 85 update on my web application. It works fine on chrome 84 or earlier, Safari, Firefox, Microsoft Edge browser.
Tried to find the changelog or bug report but there no clear hint what can block it. Service worker endsup in error (1) after waiting for long time and in console I see many request with pending/stalled status.
However those url with pending status has path info and not static resources so for example:
For reproduction:
1.Register a service worker with global scope
navigator.serviceWorker.register('/ServiceWorker.js', { scope: '/', updateViaCache: 'none' }).then(function (registration) {
});
2. Attach install event which looks like
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open(cacheName).then(function(cache) {
return cache.addAll(
[
'/css/bootstrap.css',
'/css/main.css',
'/js/bootstrap.min.js',
'/js/jquery.min.js',
'/offline.html',
'/path/subpath/par1/par2'
'/path/subpath/par1/par3'
'/path/subpath1/par4/par5'
]
);
})
);
});
3. Following request url (non static resources) will never complete and install will stuck on trying to install and eventully, in error/redudndant.
'/path/subpath/par1/par2'
'/path/subpath/par1/par3'
'/path/subpath1/par4/par5'
These are the only finding I can notice.
Any clue? What is changed in chrome 85 service worker / Fetch api which can cause this behaviour.