Today I visited a PM, deleted it, silenced the user, then after navigating back (back button) through it I got an offline error. It persisted when I tried to continue going back to meta mainpage.
It looks like you are offline! Please check your network connection and try again.
I can duplicate the problem by visiting the topic normally then hitting Ctrl-R to reload:
The error page that I get is coming from Service Worker:
I’m on Chrome Version 63.0.3239.132 (Official Build) (64-bit)
One thing I really want is a site setting to disable service workers, firstly this feature means that now everyone has to keep downloading this service worker file (we only have it cached for one day and the name can not change)
Secondly Safari seems to have a slightly more dodgy implementation that may be causing issues, it would be nice to be able to just turn this off on a site to see if it fixes stuff.
The underlying issue is what @riking mentioned, there are other exception cases that we are not handling. Probably worth testing DNS failure on local and seeing what comes back from the worker.
Also maybe we should only bother passing through the promise if navigator.onLine is false? Navigator.onLine - Web APIs | MDN. I wonder how implemented this is these days @awole20?
The complication here is that navigator is not available to service workers, so it might be simpler to detect and handle offline cases from the exception in the catch.
A big issue here is that the service worker catch clause squelches way too much, and perhaps it would be advantageous to pipe a message in the catch clause to the main js app to display or log for debugging.
There is a user on our forum (forum.matomo.org) who is having a really similar issue.
After clicking on an external link and pressing back, he isn’t able to access the forum any more, but only gets an Cannot load app - It looks like you are offline! Please check your network connection and try again error.
Removing the service worker only fixes the issue temporarily.
Does anyone have an idea on how to fix it and avoid getting the error again