question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple instances of self.__WB_MANIFEST

See original GitHub issue

Hi,

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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
minagawahcommented, Aug 18, 2021

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 string self.__WB_MANIFEST. Looks like the string self.__WB_MANIFEST is evaluated only once in Webpack builds, and it happens even when the line is commented out.

0reactions
rstoenescucommented, Mar 22, 2021

Great! Ok, then I think this ticket can be safely closed. Thanks for getting back to it and replying.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web app manifests - MDN Web Docs - Mozilla
Chrome Edge display Full support. Chrome39. Toggle history Full support. Edge7... display_override. Experimental Full support. Chrome89. Toggle history Full support. Edge8... icons Full support. Chrome39. Toggle...
Read more >
Web Application Manifest - W3C
This specification defines a JSON-based file format that provides developers with a centralized place to put metadata associated with a web ...
Read more >
Multiple instances of self.__WB_MANIFEST - Stack Overflow
Multiple instances of self.__WB_MANIFEST were found in your SW source. Include it only once. For more info, see GoogleChrome/workbox#2681.
Read more >
How to Create Multiple Dynamic Themed Angular Apps with ...
A manifest.webmanifest file which holds names and icons for when a user adds the app to the homescreen. You have <title /> and ......
Read more >
PWA Manifest: Creating Your Web App Manifest the Easy Way
icons : Your app's icons, which can consist of several images for different OSs and devices. You can define a set of icons...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found