-
-
Notifications
You must be signed in to change notification settings - Fork 321
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 script returns 404 #378
Comments
We are also suffering this issue - seems to be a breakage in It seems to be ignoring settings passed in now? v5.5.5
v5.5.4:
Config:
|
Having the same issue after updating to 5.5.5. After rollback to previous version it was fine again. I noticed that bug after the PWA wasn't updating itself on android chrome anymore since service worker was 404. should be in /public instead of /.next:
|
Also, if I write SW in options to look for different serviceWorker.js files in the public folder, it's not looking for the same. |
#372 may resolve this problem. |
I am experiencing the same issue |
How do i solve this for now? |
The best fix is downgrading to version 5.5.4 |
ok, thanks |
This PR is related to the issue, #368 |
@Lukasdotcom any tip is appreciated.
What is the compatible next version and pwa config in next.config.js that works with next-pwa@5.5.4? Locally I am able to run it fine (Lighthouse checkmark, PWA is correctly set) with next@12.1.6 and this config: pwa: {
dest: 'public',
// register: true,
// skipWaiting: true,
runtimeCaching,
buildExcludes: [/middleware-manifest.json$/],
}, However, when deployed to Vercel on production, Lighthouse shows there's no service worker: I've tried messing up with the config based on several issues of this repo, none of them seems to work in production. |
Summary
Hi,
it seems that something has been broken in the latest release (5.5.5).
The necessary files (sw.js etc.) do not get generated in /public anymore.
Versions
next-pwa
: 5.5.5next
: 12.2.2How To Reproduce
Steps to reproduce the behavior:
Link to minimal reproduce setup repository if any.
https://codesandbox.io/s/bitter-breeze-xcpdqh
Expected Behaviors
sw.js and workbox-[hash].js should be generated in public folder
Screenshots
Additional Context
Might not get noticed until deployed if files are still in the filesystem from before the upgrade.
Best,
Michel
The text was updated successfully, but these errors were encountered: