Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tamo opened this issue Aug 6, 2022 · 3 comments

Comments

@tamo
Copy link
Contributor

tamo commented Aug 6, 2022

(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
Copy link
Contributor Author

tamo commented Aug 7, 2022

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.

@gzuidhof
Copy link
Owner

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

@tamo
Copy link
Contributor Author

tamo commented Nov 24, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants