gzuidhof/coi-serviceworker

ERR_FAILED if linked from some sites (which are somehow limited by an extension) and if cached

tamo opened this issue · 3 comments

tamo commented

(Maybe related to #5. Maybe a bug in Chrome? I don't even know whether this is a bug or not. Feel free to close this issue.)

HTMLs using coi-serviceworker sometimes fail to load under some conditions. (Chrome returns ERR_FAILED)
image

For example, I have a page on github.io and it works well most of the time.
But it fails if I click a link from github.com to it, at least for the second time with some extensions enabled.
image

After a quick investigation, I've found it is reproduced if

  • uMatrix is enabled
    • XHR github.io is not allowed on github.com and
      log
  • the page (github.io) is already cached

On the ERR_FAILED page,

  • normal reloading doesn't help, but
  • hard reloading (Ctrl-Shift-R) wipes the error, and
  • modifying the URL (e.g. removing or adding a trailing slash) wipes the error, too.

I suspect it is a common issue in serviceworkers because I have seen some similar errors in other sites which don't use coi-serviceworker.
For example, visiting qiita.com from google works fine first time, but it fails second time. Fortunately I can disable serviceworkers on qiita.com with an extension but I cannot on my page because it requires SharedArrayBuffers.

tamo commented

This has been discussed at uBlockOrigin/uMatrix-issues#156
So you can safely close this issue as wontfix.

Moving from github.com to github.io, chrome uses github.io's already-registered coi-serviceworker's fetch to fetch github.io itself.
But uMatrix thinks the fetch comes from github.com, not from github.io, and blocks it.
So this is not coi-serviceworker's fault.

Thank you, also for resolving it in the end :)

tamo commented

Thank you!
As a side note, chrome devs are aware of it but nothing has happened so far.