Multiple instances of self.__WB_MANIFEST
See original GitHub issueHi,
Related to https://forum.quasar-framework.org/topic/7808/injectmanifest-precaching-not-working
I am using quasar v2.0.0-beta.5 and “workbox-webpack-plugin”: “^5.1.4”, following a pwa tutorial. I am now working on the service workers part using workboxPluginMode: ‘InjectManifest’ in quasar.conf.js. My custom-service-worker.js is just:
import { precacheAndRoute } from 'workbox-precaching'
precacheAndRoute(self.__WB_MANIFEST)
I get the following error when loading the pwa
Uncaught not-an-array: The parameter ‘entries’ passed into ‘workbox-precaching.PrecacheController.addToCacheList()’ must be an array
I have updated to lastest version of Workbox: npm install --save-dev workbox-webpack-plugin@^6.1.0 to see if it makes a difference and now I get the following error during the quasar dev -m pwa
Multiple instances of self.__WB_MANIFEST were found in your SW source. Include it only once. For more info, see https://github.com/GoogleChrome/workbox/issues/2681
The problem is that without fixing this problem, I am not able to debug the different cache strategies.
Thanks
Platform (please complete the following information): Quasar Version: v2.0.0-beta.5 @quasar/app Version: v3.0.0-beta.7 Quasar mode: [ ] SPA [ ] SSR [x ] PWA [ ] Electron [ ] Cordova [ ] Capacitor [ ] BEX Tested on: [ ] SPA [ ] SSR [x ] PWA [ ] Electron [ ] Cordova [ ] Capacitor [ ] BEX OS: windows 10 Node: v14.15.1 NPM: 6.14.8 Yarn: 1.22.10 Browsers: chrome (latest) iOS: Android: Electron:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
For those who are struggling with the message
ERROR in Multiple instances of self.__WB_MANIFEST were found in your SW source
may find this relevant. In my case, it was nothing but a comment in the service worker source containing a stringself.__WB_MANIFEST
. Looks like the stringself.__WB_MANIFEST
is evaluated only once in Webpack builds, and it happens even when the line is commented out.Great! Ok, then I think this ticket can be safely closed. Thanks for getting back to it and replying.