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

Service worker looking for outdated .js bundles #87

Closed
ttraenkler opened this issue Jan 13, 2020 · 2 comments
Closed

Service worker looking for outdated .js bundles #87

ttraenkler opened this issue Jan 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working work in progress

Comments

@ttraenkler
Copy link
Contributor

ttraenkler commented Jan 13, 2020

After the latest the deployment I noticed the font on the speakers page is not rendered correctly. Opening the console, I found 404s on https://webassembly-summit.org/speakers. On the other routes I don't get the 404s but nevertheless the bad-precaching-response.

speakers:1 GET https://webassembly-summit.org/_next/static/wXMJzV_JnmWQNVu98m8GP/pages/speakers.js net::ERR_ABORTED 404
PrecacheController.mjs:194 Uncaught (in promise) bad-precaching-response: bad-precaching-response :: [{"url":"https://webassembly-summit.org/_next/static/chunks/commons.43171be2915a298a1ac7.js?WB_REVISION=546453f9928c5e8eeabe","status":404}]
at l.o (https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-precaching.prod.js:1:1749)
at async Promise.all (index 0)
at async l.install (https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-precaching.prod.js:1:1221)
n @ WorkboxError.mjs:30
o @ PrecacheController.mjs:194

This relates to the service worker introduced in #41.

@ttraenkler ttraenkler added bug Something isn't working work in progress labels Jan 13, 2020
@ttraenkler ttraenkler self-assigned this Jan 13, 2020
@ttraenkler ttraenkler changed the title Javascript files not found due to caching issue Service worker caching error for outdated assets Jan 13, 2020
@ttraenkler ttraenkler changed the title Service worker caching error for outdated assets Service worker caching error for outdated Javascript bundles Jan 13, 2020
@ttraenkler
Copy link
Contributor Author

It seems the service worker is looking for the old Javascript bundles with an outdated filename hash suffix.

There is an open issue for this for the package next-offline we're using with unfortunately no fix so far:
hanford/next-offline#190

One option would be to disable the service worker:
hanford/next-offline#81

What I will try as a workaround however is keeping the old Javascript bundles around instead of deleting them at each deployment.

@ttraenkler ttraenkler changed the title Service worker caching error for outdated Javascript bundles Service worker looking for outdated .js bundles Jan 13, 2020
@ashleygwilliams
Copy link
Member

we've removed the service worker so we no longer need this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work in progress
Projects
None yet
Development

No branches or pull requests

2 participants