homer icon indicating copy to clipboard operation
homer copied to clipboard

Why does the dashboard try to precache/pull the default files?

Open cinderblockgames opened this issue 2 years ago • 4 comments

I've removed most of the default files, since they don't seem necessary, but the site is trying to pull them:

  • additionnal-page.yml.dist?__WB_REVISION__=...
  • config.yml.dist?__WB_REVISION__=...
  • config.yml.dist.sample-sui?__WB_REVISION__=...
  • custom.css.sample?__WB_REVISION__=...
  • manifest.json?__WB_REVISION__=...

cinderblockgames avatar Nov 17 '21 22:11 cinderblockgames

Hi @cinderblockgames!

What do you mean by the site is trying to pull them ? I don't see any request to those file in my browser console. Can you give more context? How did you install homer ? using docker ? Did you provide your own config ?

bastienwirtz avatar Dec 13 '21 20:12 bastienwirtz

I see them in my browser's developer tools network tab.

Here's my (redacted) config:

---
# Homepage configuration
# See https://fontawesome.com/icons for icons options

title: "Dashboard"
subtitle: "[redacted]"
logo: "logo.png"
# icon: "fas fa-skull-crossbones" # Optional icon

header: false
footer: false

# Optional theme customization
theme: default
colors:
  light:
    highlight-primary: "#3367d6"
    highlight-secondary: "#4285f4"
    highlight-hover: "#5a95f5"
    background: "#f5f5f5"
    card-background: "#ffffff"
    text: "#363636"
    text-header: "#ffffff"
    text-title: "#303030"
    text-subtitle: "#424242"
    card-shadow: rgba(0, 0, 0, 0.1)
    link: "#3273dc"
    link-hover: "#363636"
  dark:
    highlight-primary: "#3367d6"
    highlight-secondary: "#4285f4"
    highlight-hover: "#5a95f5"
    background: "#131313"
    card-background: "#2b2b2b"
    text: "#eaeaea"
    text-header: "#ffffff"
    text-title: "#fafafa"
    text-subtitle: "#f5f5f5"
    card-shadow: rgba(0, 0, 0, 0.4)
    link: "#3273dc"
    link-hover: "#ffdd57"

# Optional message
#message:
  #url: https://b4bz.io
  #style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options.
  #title: "Demo !"
  #icon: "fa fa-grin"
  #content: "This is a dummy homepage demo. <br /> Find more information on <a href='https://github.com/bastienwirtz/homer'>github.com/bastienwirtz/homer</a>"

# Optional navbar
# links: [] # Allows for navbar (dark mode, layout, and search) without any links
links:
  - name: "Home"
    icon: "fas fa-home"
    url: "#"
  # this will link to a second homer page that will load config from additionnal-page.yml and keep default config values as in config.yml file
  # see url field and assets/additionnal-page.yml.dist used in this example:
  - name: "another page!"
    icon: "fas fa-file-alt"
    url: "#additional-page" 

# Services
# First level array represent a group.
# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
services:
  - name: "Applications"
    icon: "fas fa-cloud"
    items:
      - name: "Awesome app"
        logo: "assets/tools/sample.png"
        subtitle: "Bookmark example"
        tag: "app"
        url: "https://www.reddit.com/r/selfhosted/"
        target: "_blank" # optional html a tag target attribute
      - name: "Another one"
        logo: "assets/tools/sample2.png"
        subtitle: "Another application"
        tag: "app"
        url: "#"
  - name: Applications
    items:
      - name: Dashboard
        url: [redacted]
      - name: Mobile Dashboard
        url: [redacted]
  - name: [redacted]
    items:
      - name: [redacted]
        url: [redacted]
      - name: [redacted]
        url: [redacted]
      - name: [redacted]
        url: [redacted]
      - name: [redacted]
        url: [redacted]
  - name: [redacted]
    items:
      - name: [redacted]
        url: [redacted]
  - name: [redacted]
    items:
      - name: [redacted]
        url: [redacted]

cinderblockgames avatar Dec 14 '21 13:12 cinderblockgames

I think this are loaded through the serviceworker of the PWA.

fbartels avatar Dec 15 '21 18:12 fbartels

I am having the same issue. I installed homer using docker compose and now the service worker tries to precache non-existent files, similar as @cinderblockgames's error.

PrecacheController.mjs:194 Uncaught (in promise) bad-precaching-response: bad-precaching-response :: [{"url":"https://example.com/homer/assets/tools/sample.png?__WB_REVISION__=2310e486d38639bd762c521ecfff5673","status":404}]
    at l.o (https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-precaching.prod.js:1:1749)
    at async Promise.all (index 0)
    at async l.install (https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-precaching.prod.js:1:1221)
o @ PrecacheController.mjs:194

sovintz avatar May 25 '22 11:05 sovintz