Skip to content

Fix pwa conflicting/missing entries in cache list #1868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 19, 2025

Conversation

he0119
Copy link
Contributor

@he0119 he0119 commented Jul 18, 2025

he0119 Quick he0119 /fix/manifest → Lissy93/dashy Commits: 3 | Files Changed: 1 | Additions: 8 Label Powered by Pull Request Badge

Category:

Bugfix

Overview

When enableServiceWorker set to true, Service Worker was unable to registered because of the following reason.

Uncaught add-to-cache-list-conflicting-entries: Two of the entries passed to 'workbox-precaching.PrecacheController.addToCacheList()' had the URL undefined but different revision details. Workbox is is unable to cache and version the asset correctly. Please remove one of the entries.

This is because the precache-manifest has two manifest.json.

  {
    "revision": "f8719853266e47aaf6f0ae56946b8014",
    "url": "/./manifest.json"
  },
  {
    "revision": "d41d8cd98f00b204e9800998ecf8427e",
    "url": "/.nojekyll"
  },
  {
    "revision": "5a8d250cf776a741afb8b4ccd2afc6b0",
    "url": "/item-icons/.gitignore"
  },
   {
    "revision": "2ebc58280d4a5a1922d2ec55e74a8c23",
    "url": "/manifest.json"
  },

And the default Express static file configuration excludes dotfiles (e.g. .nojekyll), causing precache files to return 404 errors during service worker installation.

https://cli.vuejs.org/core-plugins/pwa.html#configuration
https://developer.chrome.com/docs/workbox/modules/workbox-build?hl=zh-cn#type-GlobPartial

Accouding to the docs, we just need to remove the manifestPath config, and also exclude .nojekyll/.gitignore.

Code Quality Checklist (Please complete)

  • All changes are backwards compatible
  • All lint checks and tests are passing
  • There are no (new) build warnings or errors
  • (If a new config option is added) Attribute is outlined in the schema and documented
  • (If a new dependency is added) Package is essential, and has been checked out for security or performance
  • (If significant change) Bumps version in package.json

@he0119 he0119 requested a review from Lissy93 as a code owner July 18, 2025 00:52
Copy link

netlify bot commented Jul 18, 2025

Deploy Preview for dashy-dev ready!

Name Link
🔨 Latest commit 14fb8cd
🔍 Latest deploy log https://app.netlify.com/projects/dashy-dev/deploys/68799adfdafd780008bc65e5
😎 Deploy Preview https://deploy-preview-1868--dashy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Lissy93 Lissy93 merged commit 951aa74 into Lissy93:master Jul 19, 2025
7 checks passed
@he0119 he0119 deleted the fix/manifest branch July 19, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants