"Cannot Load App".... in Firefox sometimes. Refresh fixes it

Hello,

I run a standard Nginx reverse proxy with instructions from one of the official tutorials with DigitalOcean.

In the past few weeks, I started to notice (and others, too) random “Cannot Load App” messages when visiting the forum. Just randomly and semi-rarely. Refreshing with F5 instantly shows the site again.

Anyone have any clues?

EDIT: Plugins –

1 Like

I have the same issue, that always happens when I closed the browser with tabs saved and re open it. Than I get that messege and I need to refresh the page.

1 Like

This is on Firefox right?

In my case yes, it is

Are you starting to have more traffic?

I’ve seen this most often when the server isn’t able to keep up.

I think the message that we send when fetch throws an error is confusing.

      fetch(event.request).catch(function(error) {
        // The catch is only triggered if fetch() throws an exception, which will most likely
        // happen due to the server being unreachable.
        // If fetch() returns a valid HTTP response with an response code in the 4xx or 5xx
        // range, the catch() will NOT be called. If you need custom handling for 4xx or 5xx
        // errors, see https://github.com/GoogleChrome/samples/tree/gh-pages/service-worker/fallback-response
        return caches.match(OFFLINE_URL);

If the server is unreachable, it doesn’t mean that the client is offline and I think this is why a lot of people are getting confused.

4 Likes

What do you suggest as the alternate text? Can we even control the text the browser shows in this scenario?

Had this happen to us this morning. I rebooted our droplet (digital ocean hosted) and it seemed to resolve the issue.

1 Like

This is a bug in Firefox Session Restore feature active in version 59.

Right now I can’t repro this in Firefox 60 beta so I’m assuming they fixed it already.

Like @pfaffman said this can be a server problem or anything in between (like you being in a flaky connection).

Yes, if your server goes down you can see this message too.

6 Likes

Thanks a lot for the Info

FWIW: Seeing this issue on Firefox Nightly 61.

Just went to the Letsencrypt Forum … Cannot load app …
Then went here to report … Cannot load app.

It’s frustrating :frowning:

I wonder if the support load the offline service worker generates justifies the benefit it provides on desktop, on Android it is fine, but gain on desktop is sketchy

Beta browsers are explicitly not supported, and never have been… I suggest opening an issue with Firefox on a beta bug.

I submitted this bug to Mozilla:

Also pinged @LeoMcA to help us.

5 Likes

Firefox team confirms it’s fixed in Firefox for next release:

5 Likes

I had this great idea that we should only display the offline page by figuring out what type of error we’re getting. However…

A fetch() promise will reject with a TypeError when a network error is encountered or CORS is misconfigured on the server side, although this usually means permission issues or similar

So I experimented locally and get the same error, TypeError: Failed to fetch, whether I am offline or whether the server is down. No way of telling why the fetch request fails. The console does log net::ERR_CONNECTION_REFUSED but that is not available to us…

Even a Google Engineer wrote this in his blog post

This is hands down, one of the worst error messages I’ve ever seen.

7 Likes

Hmmm … how reliable is navigator.onLine these days? can we use it.

  1. Get an error
  2. Check navigator.onLine
  3. If not online (has property and property is false) then display a different page.
4 Likes

Nice I didn’t know about navigator.onLine. Since it is widely supported, the service worker will now display the cached offline page only when the user is offline.

9 Likes