glanceapp / glance

A self-hosted dashboard that puts all your feeds in one place
GNU Affero General Public License v3.0
8.56k stars 297 forks source link

Assets aren't loaded #189

Closed avivi55 closed 3 months ago

avivi55 commented 3 months ago

First of all, nice job it's beautiful.

I am using the personnaly compiled version after a git clone of the main branch. I also tried the precompiled binary from release v0.5.0 and same problem.

It worked fine on the docker version (by mounting the same directory), but I don't wish to use docker.

The problem is that the assets-path is shown to be correctly set, but when trying to load icons they don't show/don't exist.

This is the glance.yaml part

server:
  host: 127.0.0.1
  port: 8080
  assets-path: assets

...

          - type: monitor
            cache: 1m
            title: Services
            sites:
              - title: WTFPL
                url: http://www.wtfpl.net/
                icon: /assets/wtfpl.ico
$ go run .
2024/08/08 16:28:17 INFO Serving assets path=/home/user/Documents/glance/assets
2024/08/08 16:28:17 INFO Starting server host=127.0.0.1 port=8080
$ tree /home/user/Documents/glance/assets
/home/user/Documents/glance/assets
└── wtfpl.ico

But this is what I get in the glance page icon error

I tried with an absolute path, it doesn't change anything. I compiled it an run the executable instead of go run, still the same.

Thank you for your consideration.

avivi55 commented 3 months ago

well ... this is akward, it magically fixed itself ...

I don't know why, but I'm thankful.

svilenmarkov commented 3 months ago

What may have happened here is that you initially had it set up incorrectly and got a 404 which got cached, then subsequently kept getting served the cached 404 until that cache expired.