Troubleshoot Service Worker Issues

Fix service worker, cached shell, and stale offline asset issues.

Sentrik POS help center support illustration

The service worker supports the offline shell, cached core pages, cached build assets, offline API fallback, and background sync for pending sales. It registers only in production builds. In development, the app unregisters service workers and clears caches.

Check the basics

  1. Confirm the app is running as a production build.
  2. Confirm the browser supports service workers.
  3. Open browser developer tools.
  4. Check Application > Service Workers.
  5. Confirm /service-worker.js is registered with scope /.
  6. Check Cache Storage for the offline shell and build asset caches.
  7. Reload the page after updating the app.

If the offline shell does not appear

Make sure the device visited the app while online after the latest deployment. The service worker must install and cache /offline-shell.html before it can show it offline.

If stale assets appear

Update the app, close old tabs, reload, or clear site data only after confirming no pending sales exist.

Tips

Never clear service worker storage on a live register with pending sales unless support has confirmed those sales are already synced or safely backed up.

Share this article

Related articles