The issue is that self.skipWaiting()
seems to have no effect when Firebase's Firestore is being used (on Chrome version 101.0.4951.54).
Steps to reproduce:
- Run
npm start
and visitlocalhost:5050
- Notice that the Service Worker is installed
- Update the
currentCacheName
inpublic/sw.js
- Refresh
localhost:5050
- Click "OK" on the confirm modal
- Notice that the new Service Worker is not installed
- Uncomment the commented lines in the Service Worker's
fetch
event toreturn
early from the cross origin requests - Repeat steps 2-5
- Notice that the new Service Worker is installed
Video Overview: https://drive.google.com/file/d/1M3HvvVll8T38i2YVGAjaOsovkYyCvGlk/view?usp=sharing