offline-plugin: occasional service worker failures (causing a broken app)

My application uses multiple chunks to split the code.

From time to time I noticed that the application fails to load chunks/URLs, with no apparent reason.

Once it fails, it is not able to recover by itself. For example, force-closing the browser or restarting the device does not help. The very same URL keeps failing.

The only possibility to “fix” the problem is to manually clear all(!) the application data in the browser.

Right now this problem appeared once again on my phone (Samsung S7 running Chrome 54), so I started a remote debugging session using Chrome devtools.

There isn’t much to see in the console log, except for this suspicious message:

Service Worker termination by a timeout timer was canceled because DevTools is attached.

The network tab shows this for the “failing” request:

grafik

grafik

The Response tab says This request has no response data available.

In case it helps, here you can see all the network requests since application start:

grafik

In other browser sessions the URL (which is correct) can be loaded without any problems. In fact, on other computers the same app works fine.

What can cause this?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 26 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Okay, if you understand you correctly, then the branch async-waitutil has nothing to do with this issue.

It’s related to this issue. I don’t know how this issue may happen and have no repro for it, so the potential thing why it may happen is that thing with async waitUntil, so I made that change and asked you to test with it. But since you are saying that you don’t face this issue at all anyway (even without async waitUntil fix) I assume that there is no issue at all. Once there is repro – I’ll be happy to resolve it and apply needed fixes 😃

BTW, I’m able to build offline-plugin from source (master branch) by manually installing npm install babel-runtime - perhaps just a dependency in package.json is missing.

npm run install:build-deps. It’s excluded from normal npm install to not force CIs install it (because they don’t need it).

@jampy yeah, but not yet 😃