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

(Dylan Hunt) #1


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 –

"Cannot load app" error when pressing the back button on Firefox
(Daniel Nevoigt) #2

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.

(Rafael dos Santos Silva) #3

This is on Firefox right?

(Daniel Nevoigt) #4

In my case yes, it is

(Jay Pfaffman) #5

Are you starting to have more traffic?

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

(Alan Tan) #6

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.

(Jeff Atwood) #7

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

(Rob) #8

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

(Rafael dos Santos Silva) #9

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.

(Daniel Nevoigt) #10

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:

(Sam Saffron) #12

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

(Jeff Atwood) #13

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

(Rafael dos Santos Silva) #14

I submitted this bug to Mozilla:

Also pinged @LeoMcA to help us.

(Rafael dos Santos Silva) #15

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

"Cannot load app" error when pressing the back button on Firefox
(Rafael dos Santos Silva) #16

(Alan Tan) #17

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.

(Sam Saffron) #18

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.

(Alan Tan) #19

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.