dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[BUG] Favicon not loading on page load

Open elendil7 opened this issue 1 year ago • 10 comments

Environment

Self-Hosted (Docker)

System

Dashy running in Docker container behind Nginx

Version

3.1.0

Describe the problem

Dashy favicon no longer loads after update.

image image

Additional info

No response

Please tick the boxes

elendil7 avatar May 16 '24 00:05 elendil7

Hi It's really hard with such less details to diagnose this, for me it's working totally fine.

Please share your nginx conf. You can try clearing all browser cache and cookies, and try another browser in the private window.

CrazyWolf13 avatar May 16 '24 03:05 CrazyWolf13

Hi, I'm running pretty much the same configuration and I'm having an issue with the favicon not showing in Firefox. This is using a fully cleared cache and also in a Private Window. I can't comment update breaking it, as I only switched back to Firefox from Brave a few hours ago. I get the same problem if I bypass the reverse proxy.

If I append the various /favicon.ico, /web-icons/favicon-32x32.png etc. listed in Firefox's inspector tab to the URL most of the icons are loading. However, if I'm reading the Network Inspector tab correctly, then Firefox is trying to use https://home.mydomain.org/img/icons/favicon-16x16.png but favicon-16x16.png doesn't exist. It's showing 404 not found in Firefox's inspector and as a directly accessed URI.

I think there are 2 issues here: The missing favicon-16x16.png and Firefox seemingly being determined to use the missing image, rather than fallback to favicon-32x32.png or favicon.ico.

Cheers.

pelstob avatar May 16 '24 08:05 pelstob

Yeah I've just looked into this and in firefox the favicon is not showing up at all.

Seems to be only a problem on firefox and possibly apple devices: image

Firefox still seems to have hardcoded a preferred size: view-source:resource:///modules/FaviconLoader.sys.mjs

....
const FAVICON_PARSING_TIMEOUT = 100;
const FAVICON_RICH_ICON_MIN_WIDTH = 96;
const PREFERRED_WIDTH = 16;
....

I think dashy is somewhat missing the correct variable to define the favicon for firefox, however I was not able to find any working variable. It seems that firefox has issues regarding favicon dating from a month ago to 20years back 😂

I tried adding the 16x16 pixel variant which was once included: https://github.com/Lissy93/dashy/commit/7e4e2edc0cd494ce8c9e5126c5905e3879e2d9a3#diff-66c2900b7fcc62569ea372a2058eb4935e7559dcea7a3052b36d843a6e190734

But that did nothing, as firefox somehow expects a favicon on exactly this url: image

CrazyWolf13 avatar May 16 '24 18:05 CrazyWolf13

Can confirm this bug, icon is not displaying on Firefox. I'll submit a fix (by adding the appropriate icons in, and updating the paths in index.html) this weekend.

Lissy93 avatar May 16 '24 23:05 Lissy93

If anybody is using Caddy as a reverse proxy and looking for a quick fix: modify your Caddyfile to rewrite the favicon path:

dashy.domain.example {
  reverse_proxy http://<your-ip-here>
  rewrite /img/icons/favicon-16x16.png /favicon.ico
}

If you also need Apple support (or whatever that failed call to apple-touch-icon-152x152.png should be), you can add it in the same way:

rewrite /img/icons/apple-touch-icon-152x152.png /favicon.ico

ubff389 avatar Jun 11 '24 20:06 ubff389

Any updates on this? Firefox still doesn't load the favicon correctly for me.

alvarodev-lc avatar Jul 17 '24 09:07 alvarodev-lc

I'll submit a fix (by adding the appropriate icons in, and updating the paths in index.html) this weekend.

@Lissy93 Have you yet had time?

CrazyWolf13 avatar Jul 17 '24 10:07 CrazyWolf13

Same issue, and with the new firefox vertical sidebar this is becoming particularly annoying, the whitespace in screenshot is where the favicon ought to be... Screenshot from 2024-07-31 10-34-29

Zixim avatar Jul 31 '24 08:07 Zixim

@Lissy93 I'd like to bump this again. A fix would be highly appreciated. :)

m42cel avatar Aug 21 '24 09:08 m42cel

@m42cel Please do not randomly ping lissy, she will come back to this as soon as she can.

CrazyWolf13 avatar Aug 21 '24 10:08 CrazyWolf13

With today's image update, it's now working for me (Firefox). The favicon is back!

rdswords avatar Aug 24 '24 19:08 rdswords

Yup got fixed by a PR here: https://github.com/Lissy93/dashy/pull/1678

CrazyWolf13 avatar Aug 24 '24 19:08 CrazyWolf13

Thank you! image

elendil7 avatar Aug 24 '24 20:08 elendil7

confirmed, thx for the merge !

Zixim avatar Aug 25 '24 08:08 Zixim