Skip to content

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Dec 20, 2020

When opening chromium devtools on first load, it makes a request that violates Request.cache spec: (chromium#823392)

The "only-if-cached" mode can only be used if the request's mode is "same-origin". Cached redirects will be followed if the request's redirect property is "follow" and the redirects do not violate the "same-origin" mode. (mdn)

Solution is to rewrite workbox request by detecting this condition and change cache option to default


Since there might be more causes for uncaught errors (#176 (comment)) this PR is also adding more context to production errors with full context:

Before: (production - debug disabled):

image

After: (production)

image

For more context, one may still enable production debugging in nuxt.config:

{
  pwa: {
     workbox: { debug: true }
  }
}

This PR resolves #176 with best efforts. IMPORTANT: Disabling clientsClaim as workaround with other defaults is NOT SAFE and may cause caching problems and if you was doing it before, should keep it with default value

@codecov
Copy link

codecov bot commented Dec 20, 2020

Codecov Report

Merging #417 (dcb519f) into master (be2bc76) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #417   +/-   ##
=======================================
  Coverage   85.28%   85.28%           
=======================================
  Files           9        9           
  Lines         367      367           
  Branches      122      122           
=======================================
  Hits          313      313           
  Misses         54       54           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be2bc76...dcb519f. Read the comment docs.

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

Successfully merging this pull request may close these issues.

Workbox strategies uncaught no-response

2 participants