Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

FetchEvent.respondWith() Redirected Response Error #234

Closed
mjsisley opened this issue Jan 5, 2017 · 2 comments
Closed

FetchEvent.respondWith() Redirected Response Error #234

mjsisley opened this issue Jan 5, 2017 · 2 comments

Comments

@mjsisley
Copy link

mjsisley commented Jan 5, 2017

I am getting the following error/warning in Chrome Canary:

In Chrome 59, the navigation to "https://XXX.com/service" will result in a network error, because FetchEvent.respondWith() was called with a redirected response. See https://crbug.com/658249. The url list of the response was: ["https://XXX.com/index.html?_sw-precache=e5c12585e6ea3bf5c537ff5689ed10c9", "https://XXX.com/"]

Here is my config (using webpack plugin)

  new SWPrecacheWebpackPlugin(
    {
      cacheId: 'XXX',
      filename: 'service-worker.js',
      dontCacheBustUrlsMatching: /\w{20}\./,
      navigateFallback: '/index.html',
    },
)

The assets are served from a CDN with rewrites for all routes set to index.html and rendering is done on the client (seemingly all irrelevant).

Thanks in advance.

@jeffposnick
Copy link
Contributor

So I believe that the changes made in #233 should address this issue.

Those changes were just deployed to the 4.3.0 release of sw-precache.

Can you confirm that you no longer see that warning message when using a service worker generated with 4.3.0?

@jeffposnick
Copy link
Contributor

Actually, I have a better idea as to what the issue is now, but unfortunately #233 didn't fix it.

I'm going to follow-up on this in #220 since it tracks the same issue.

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

No branches or pull requests

2 participants