Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

210
Visualizações
Service Worker stuck in infinite installing state (iOS Safari)

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:

  • In the service worker file, I have self.skipWaiting() in the installing event
  • For the on client side of the service worker, after the service worker goes from installing to activated I reload the page.

Thanks for any help!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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):

  1. Update your site binding to the new cert
  2. IMPORTANT: RESTART the server not the site
    • I believe this step fixes the issue because it flushes out whatever bindings IIS had cached.
  3. Now in your PWA get updates

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.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda