Skip to content

PWA / Service worker breaking production deployments #2440

Closed
@ro-savage

Description

EDIT: Issue appears to be with Firebase only

Service workers aren't refreshing index.html and therefore new deploys are showing old bundles.

This means production websites or really all deployed sites that use a single url/domain can not be updated.

PR #2441 - Is a hotfix (if needed) that just removes the service worker and updates docs to say they have been disabled temporarily.

@gaearon @Timer @jeffposnick @addyosmani

Steps to reproduce

  • create-react-app sw-test
  • cd sw-test
  • npm install
  • npm run build
  • cd build

Deploy with firebase

  • firebase deploy
  • Visit site https://[project].firebaseapp.com. Confirm working.
  • Change app.js
  • npm run build
  • cd build
  • deploy firebase

Check website

  • Visit site again and no changes shown. DevTools shows SW is providing index.html and old bundles.
  • Force refresh a few times. No difference.
  • Delete service worker.
  • Refresh.
  • See correctly updated site.

Can someone else confirm this is affecting them?

I am hoping I am doing something wrong and this isn't affecting every production deploy.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions