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
@angular/pwa cannot refresh pwa after rebuild - Driver.<anonymous> (ngsw-worker.js:1988) property 'id' of undefined #23742
Comments
I've used this fix for that issue: ngsw-worker.js:2208 Replace: Why? |
I got the exact same error Edit @niikoo your solution has the side effect, that the browser will treat the new ngsw-worker.js as a new SW to replace the old one. I'm not sure how the versioning or updating is being done but essentially ng build prod does generate the exact same SW each time, which then loads a different ngsw.json. |
We have the same error but only in Chrome (Version 66.0.3359.139) the webapp won't load. Update |
For me, the workaround to get NG6 PWA to be able to refresh was posted by Dirand and Argentan angular-cli/issues/8779. Dirand suggested to check if application is stable:
Argentan suggested to register the service worker in main.ts:
|
same error,who can help me. |
@walle233, the fix has been merged a while ago. It is in the latest 6.x version and will be in the next 5.x release as well. What version are you using? |
@gkalpak i use 5.x version.thank you for reply to me. |
update @angular/service-worker to 5.2.11 see: angular/angular#23742 and angular/angular#23625. Also made manifest.json look nicer
I have same error. |
If i check the date of your answer, the fix should be in the 5.2.11, i will try to update all my angular packages to this release and give you a feedback. |
It seems to work @gkalpak, i did not see the 5.2.11 before because it is between the 6.x releases. Good job guys ! Thanks 💪 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
Current behavior
ng add @angular/pwa
ng build --prod
http-server -p 8080 dist/angular6/
current behavior: the app starts at http://localhost:8080/ and i can see the browser downloading all the files including the service workers, if i put the browser offline i can still see the app and the resources fetched by the sw.
ng build --prod
http-server -p 8080 dist/angular6/
I get this error:
Environment
The text was updated successfully, but these errors were encountered: