pwa-wp icon indicating copy to clipboard operation
pwa-wp copied to clipboard

Document common problems and solutions

Open iandunn opened this issue 6 years ago • 2 comments

I figured it'd be good to start a thread of common problems and solutions that people run into, so we can start to see patterns and document them.

To start, sometimes there are PHP warnings/notices in the script that generates the service worker JS, so it won't be installed. Depending on circumstances and browser, this can be easy to miss. The solution is to open the file/?wp_service_worker=1 (or the admin equivalent) manually to inspect it.

iandunn avatar Jun 20 '19 22:06 iandunn

That example might be fixed by #178

iandunn avatar Jun 27 '19 22:06 iandunn

One problem I ran into while testing #178 is that, when switching between Git branches, the /?wp_service_worker=1 output didn't always change, even when using curl to request it. It was only after I added a cachebusting param to the request that I saw the expected results.

I'm guessing that's a problem w/ my local environment, rather than the plugin, though. Maybe OPcache or Nginx is caching too aggressively or something. It's worth noting in case other people run into it, though, since I'm assuming the same thing would happen when registering caching routes, strategies, etc.

iandunn avatar Jul 25 '19 17:07 iandunn