shadowwalker / next-pwa

Zero config PWA plugin for Next.js, with workbox 🧰
MIT License
3.75k stars 311 forks source link

sw not working with fresh browser tab #397

Open varand-pez opened 1 year ago

varand-pez commented 1 year ago

Summary

So this is weird behavior, not even sure it's next-pwa issue. but when I do Clear browsing data for the browser and clear site data from dev tools/Applications, the pwa breaks, feels like beforeinstallprompt is not being fired anymore. because my custom install banner is not appearing. But everything is fine after the first reload.

Versions

How To Reproduce

I do not have live example, but basically:

  1. clear browsing data
  2. clear site data from dev tools -> Applications
  3. load the app.
  4. See the beforeinstallprompt not firing.

Expected Behaviors

my custom banner should show up

Sorry for the lame bug report. I really dont know how to debug? could this be the service worker not registering on cleared cache tabs?

Any help would be appreciated.

varand-pez commented 1 year ago

I'm not sure, maybe I'm dealing with second bullet point scenario. Meets a user engagement heuristic (currently, the user has interacted with the domain for at least 30 seconds).

Is that still true?