-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined on ionic PWA update #14043
Comments
I had the same issue with an Ionic app application, fixed by |
Hi @shariajoe, |
@YamanSehzade no, still haven't fixed it. |
Hi, Setting both clientsClaim and skipWaiting as false ensures that code on open tabs is maintained throughout their lifetime and only updated once all stale tabs are closed and a new one open. So no more errors after update. |
Hey @shariajoe ! Can you share which part of the code did you update? I got the same issue but can't find right place to change it. thanks |
@elviocb I edited my sw-precache-config.js on the root of my app to look as below |
@mohamed-Fadl thanks, your solution worked for me 😄 |
@shariajoe when do you run the precache step in the deploy process? before or after |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version:
[ ] 2.x
[x] 3.x
[ ] 4.x
I'm submitting a ...
[x] bug report
[ ] feature request
Current behavior:
My ionic PWA runs without error on ionic serve, however after a build, the app throws the error
Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined
Happens every time I update my source code and try to navigate to a different page.
The error goes away after refresh.
Expected behavior:
Updates to the web app should be seamless even with cached content on the service worker
Steps to reproduce:
Build ionic PWA using npm run ionic:build --prod use sw-precache with the provided configs. Make an update to your ionic/angular code and push the update to hosting. The error occurs on switching to another page after update of the service worker.
Also added a no-cache header to my service-worker on firebase hosting
Related code:
I am using sw-precache to generate my service worker code and Firebase hosting
sw-precache-config.js is set up as below:
packge.json is as follows:
Issue might be related to this:
swimlane/ngx-charts#568
Ionic info: :
The text was updated successfully, but these errors were encountered: