[Solved] PWA not installable via desktop Chrome
-
I am trying to test my PWA on the desktop, and according to what I have read I should be able to install it in Chrome. However, when I load my PWA in the Chrome browser, I have an error in the Application debug tab that simply says (under “Installability”) “Page does not work offline”. What is odd is that I can definitely install the PWA on both iOS and Android. Any ideas what I need to do/change to make this work in Chrome on desktop (MacOS in my case btw)?
-
I thought it might be that my manifest was missing the
scope
parameter, so I added that. But alas, no love. And it is not my environment either, because if I go to mobile.twitter.com, there IS an option to install the app in Chrome on desktop. Still investigating, but if anyone has any advice I would appreciate it… -
I also get this in the console on loading the app btw:
Service worker has been registered. New content is downloading. Content has been cached for offline use.
-
Running lighthouse gives me one error which may be the culprit:
start_url does not respond with a 200 when offline
But not sure how to fix, the service worker file is generated during build by Quasar and seems to be active and working in Chrome.
-
I noticed something else that is odd. Quasar’s built PWA does not seem to be adding to the Cache Storage in dev tools (whereas Twitter’s mobile app DOES). And yet Chrome’s dev tools SEEM to indicate that the service worker is loading properly.
-
Figured it out! I had set
workboxPluginMode: 'InjectManifest',
in order to quiet my workbox debug messages, but this was causing the service worker to not cache resources locally. After commenting that out and rebuilding, it now works! Hope this helps someone else.