67P / hyperchannel

Kosmos Chat for the Web
Mozilla Public License 2.0
20 stars 3 forks source link

ServiceWorker problem in FF (reloads many times) #80

Closed raucao closed 4 years ago

raucao commented 7 years ago

I just deployed the SW-enabled master to https://hyperchannel.kosmos.org. Looks good in Chrome on my phone, but breaks horribly in FF stable on Linux for me. It thinks that the cache is outdated at least once, but sometimes going into an infinite loop, deleting caches and reloading the app endlessly.

gregkare commented 7 years ago

I'm getting the same infinite loop on Firefox stable (OS X)

raucao commented 7 years ago

I found out what the problem is (roughly): it's a bug in FF, dealing with multiple ServiceWorkers. The 5apps shim worker (which does literally nothing, it's just a shim with no code to enable install dialogs) "conflicts" with the caching worker in this case. Chrome handles it just fine, and I couldn't find anything in the cache worker code that could make it fail.

Problem is that the worker is currently required in Deploy's web manifest deployment strategy, which also generates the web manifest. I think we should remove the shim manifest from that, and instead tell users about having to use one, in case they don't bring their own SW.

Edit: I also turned off that depstrat for now, so the caching SW is still there, but no Web Manifest.

raucao commented 6 years ago

We could check out https://developers.google.com/web/tools/workbox/