I have ran into a weird use case that puts my PWA's service worker into an infinite installing state.
If I switch the site's SSL cert from one certificate that's about to expire to a new one, the site will detect a new version, which will then update to the next service worker, but then after the page reloads, it detects another new version, and again and again. I have not had this occur in Chrome, only iOS Safari.
The only thing I can think of why this occurs is because the site is still holding on the previous SSL cert, which is why the service worker keeps updating.
Background on the SW:
self.skipWaiting() in the installing eventThanks for any help!
For anyone in the future I have found an answer for this.
The reason the update loop was occurring was because Safari would not release the old cert after I updated the bindings. Now Chrome does have similar behavior with it not using the new cert, but it would not cause an infinite update loop.
Turns out the solution is simple (This is for IIS):
You will notice in Safari a update will be detected even though you haven't actually updated the PWA itself. After the update the new cert should be loaded in and your good to go.