Getting error "Cannot read property 'call' of undefined"

I got the same problem and confused me and users live online very often every time I release a new version.
I met the problem in PWA using Chrome browser.
It needs time to make js files expire, the browser will reload all to newest state after cache expire.
remove Cache Storage didn’t help.
I don’t know the sw-precache CACHE mechanics of Chrome, but obviously Chrome loads some new js files and some old ones at a weird mechanics.
Moreover Ionic didn’t regenerate index.html every time to solve cache problem.
Hence, every time after PWA build, and before release WWW to host,

$ npm run ionic:build --prod

I will modify index.html manually change “.js” to “.js?v=xxxx” to force browser to reload to the newest state.

ex,
src=“build/polyfills.js?v=1.45”
src=“build/vendor.js?v=1.45”
src=“build/main.js?v=1.45”

Hope it helps

Hi,If you run this application in localhost:8080! sometimes will shown previous error message(error message show cache memory error).Next you again save that file and re-run this application it’s working correctly,Maybe i don’t know,please try it.

The number 1 cause of this is using the Service Worker in Development (for PWA’s at least)… Make sure the Service Worker is commented out in index.html, AND make sure you stop and unregister any previous service worker (in Chrome Dev Tools, application/service workers, click stop, then unregister)…

After that simply a Hard Reload will usually work to refresh everything.

What’s happening is that when you rebuild the app, the .js files are renumbered (especially if you have added a new page or component), and the old page with that XX.js number is being served by the service worker and loaded