Hello,
i’m trying to learn Ionic by building a simple Angular PWA.
I’ve created an app using the “blank” template, have added PWA with ng add @angular/pwa and built with ionic build --prod.
I’ve uploaded the www folder in a my https site and if i browse this from my mobile i can add it to my home screen.
If i open it from the App icon i get “The site cannot be reached” ERR_FAILED Chrome error for some seconds, then the app loads and works fine.
What do i need to do to avoid the initial error?
Thanks in advance and greetings
Cris
@cds68 The hash-mismatch error generally means that the resource served from the server is not identical (content-wise) to the one hashed during ng build.
Have you updated: @angular/service-worker to the latest?
Sino, intenta colocar en el código de tu ngsw-worker.js el sigiente código:
It destroys the old service worker, and redirect the user to the website again with a clean SW.
And finally, try another hosting that isn’t firebase (vercel, next for example), since firebase from time to time make with funy things when you deploy a SW to production.