New issue
Advanced search Search tips

Issue 874173 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Fetch API inside of a Service Worker fails upon reloading (but only on home page)

Reported by chr...@pinckneyhugo.com, Aug 14

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce the problem:
1. Load a page that installs a service worker (maybe only specific sites?)
2. Simple reload will trigger the offline page from cache (or a connection error page)

What is the expected behavior?
1. Load a page that installs a service worker
2. Simple reload will load the same page from cache

What went wrong?
The Fetch API is successfully loading other resources, but fails (without additional context to the error message- only "Failed to fetch") when attempting to load the home page. When reloading, it attempts to load the home page via Fetch API and when it fails, it delivers the cached offline page (if available) or the browser's network connection error page.

Did this work before? Yes Chromium 66

Does this work in other browsers? Yes

Chrome version: 68.0.3440.106  Channel: stable
OS Version: OS X 10.13.6
Flash Version: 

I'm not the most familiar with creating bug reports for browsers, so the test case I attached is just two basic Fetch API calls with 2 different pages. This is happening on my website: https://gearside.com/nebula/ and the test case I attached is a snippet I have inside of my service worker file. The console and Network tab in DevTools will show the "A" group as successful, but the B group will fail.

I don't know if any other websites have this problem, but mine started having it after I updated to Chrome stable 67 and persisted in 68. I tested it in Chromium 66 and it worked as well as every other stable browser that supports Service Worker. I also ran it on an old Mac using Chrome 49 and it worked there too. It also works in Chrome Canary (70) so I don't know if it has been addressed or if there is something else going on.

I've written up a question on Stack Overflow before I was sure it was a browser bug and I've also logged many more notes in my Github repository here.

https://stackoverflow.com/questions/51833056/fetch-api-inside-service-worker-fails-only-for-the-home-page-when-reloading-it
https://github.com/chrisblakley/Nebula/issues/1709#issuecomment-408652382

Hopefully I've included enough information to shed some light on this.
 
sw-fetch-api-test.js
655 bytes View Download
chrome-66-success.png
105 KB View Download
chrome-error-console.png
72.6 KB View Download
chrome-error-network.png
85.3 KB View Download
Components: Blink>ServiceWorker
Labels: Needs-Triage-M68 Needs-Bisect
Cc: susan.boorgula@chromium.org
Labels: Triaged-ET Needs-Feedback
chrisb@ Thanks for the issue.

Tested this issue on Mac OS 10.13.3 and Windows 10 on the reported version 68.0.3440.106 and the latest Canary 70.0.3523.0 and unable to reproduce the issue by following the below steps.

1. Launched Chrome and navigated to https://gearside.com/nebula/
2. Opened Devtools -> Console and couldn't observe any error in Console.
Attached is the screen shot for reference.

Request you to check and confirm if anything is missed from our end in triaging the issue.
Also request you to retry the issue on a new chrome profile without any flags/extensions and update the thread with the observations.

Thanks..
874173.png
486 KB View Download
Thank you for the information. When trying it in a guest window both fetches worked fine just like you show in your screenshot. I disabled all extensions and it worked as well. After some troubleshooting I discovered it has to do with the extension uBlock Origin. Even though the extension setting is set to ignore this domain, it still breaks the fetch.

This ticket can be closed as it is not a Chrome issue. Thanks again.
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 16

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Bisect
Status: WontFix (was: Unconfirmed)
chrisb@ Thanks for the update.

As per comment #4, marking this issue as WontFix, as the reporter has confirmed.

Thanks..
After discussing this issue with the extension developer he mentioned that it may not actually be caused by the extension. I wanted to check a few more production releases of Chrome and the problem I'm running into is still happening regardless of version (currently 70).

https://github.com/uBlockOrigin/uBlock-issues/issues/173

It only happens when that extension is installed/active, but the developer mentioned that it is related to this Chromium issue here:
https://bugs.chromium.org/p/chromium/issues/detail?id=834734

I can provide information for that issue, but I want to make sure that it is related (and what data would be useful for me to provide) before I muck up other tickets here.

I'll admit that I'm a little beyond my knowledge of the inner workings of Chrome, so I'm afraid I can't add much more detail than the Github Issue transcript I provided, but I'm happy to provide any additional information needed to help troubleshoot this. The screenshots from the initial report here are still occurring for me (I've kept my notes in my own Github repo here: https://github.com/chrisblakley/Nebula/issues/1709).

Sign in to add a comment