-
Notifications
You must be signed in to change notification settings - Fork 6k
Service Worker not defined while accessing PWA in development #3834
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
Comments
Apologies @cuining for prematurely closing your PR and thank you for raising the issue! 3.11I am not able to reproduce in 3.11, which is a good sign. Local developmentI am also not able to reproduce 🤔 (macOS + Brave) |
Wait, premature comment, I did not refresh |
VideoScreen.Recording.2021-07-21.at.2.25.43.PM.movOkay so actually I believe this is a different bug. I told @code-asher about this a while ago but couldn't reproduce consistently. This happened before the migration away from Parcel. The workaround is to close the PWA and reopen. But the fact that you're seeing the raw JS in the browser feels odd and I wonder if these are two separate bugs or the same, manifesting differently 🤔 |
I have the same issue with 3.11. It looks for the serviceWorker.js at /node_modules/code-server/dist/serviceWorker.js but in fact the new location is /node_modules/code-server/out/browser/serviceWorker.js |
Ahhh, I must have forgot to change it in one place. Thank you for the tip @lsoica! |
Could this be a caching issue? i.e. it cached the old path. Would a hard refresh fix it? |
Cleaning app cache and browser file cache didn't help. Anything else that I've missed ? |
Nope! Thank you for trying. cc @code-asher in case he has any other ideas. We're going to look at this in the next cycle (starting next week 🤞) |
Ack we didn't update this path! We probably didn't notice during development because we had the old Parcel |
Looks like we should re-open that PR as it has the right fix. |
Cool! I'll do that since I closed it. |
Same for me but in 'production'. The manifest looks like this
MacOS |
Thanks for the update! This should be fixed when we get 3.11.2 out the door. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days. |
As first reported in a PR by @cuining, this regression seems to be introduced in the move away from Parcel.
I believe this may be addressed in #3833, but some more information is still needed.
OS/Web Information
code-server --version
: 3.11.0Steps to Reproduce
yarn watch
Expected
No console errors should occur.
Actual
Service worker registration fails due to an invalid path. However, the file is available at an different path.
Screenshot
The text was updated successfully, but these errors were encountered: