Website icons won't show. (Only the fallback icon does) #2393

Closed
opened 2025-10-09 18:03:36 +03:00 by OVERLORD · 15 comments
Owner

Originally created by @Ryonez on GitHub.

Been testing a little still, and have noticed that items don't show a icon related the the site saved in it.

Looking at the dev console shows:
image

I think there's a deeper issue though as navigating to the link that's meant to be to the image doesn't display anything:
image

This issue appears in the web vault, desktop and chrome browser clients.

Originally created by @Ryonez on GitHub. Been testing a little still, and have noticed that items don't show a icon related the the site saved in it. Looking at the dev console shows: ![image](https://user-images.githubusercontent.com/16157130/42133979-0d3e5340-7d87-11e8-8210-19a5d0c86257.png) I think there's a deeper issue though as navigating to the link that's meant to be to the image doesn't display anything: ![image](https://user-images.githubusercontent.com/16157130/42134007-5d80637a-7d87-11e8-805d-78cebf59a359.png) This issue appears in the web vault, desktop and chrome browser clients.
Author
Owner

@dani-garcia commented on GitHub:

Strange, I did some testing and if I create an entry with a URL of www.google.com the icon loads, but if I use google.com instead, the web vault simply refuses to make the request at all (both in chrome and in firefox), I'll have to investigate some more. On the other side, the chrome extension works for me in my example, and so does making the request manually (opening http://localhost/icons/google.com/icon.png in the browser).

About your issue, does www.google.com work for you? By default we act as a proxy cache for the official icons service (at icons.bitwarden.com), so we don't do anything special.

@dani-garcia commented on GitHub: Strange, I did some testing and if I create an entry with a URL of `www.google.com` the icon loads, but if I use `google.com` instead, the web vault simply refuses to make the request at all (both in chrome and in firefox), I'll have to investigate some more. On the other side, the chrome extension works for me in my example, and so does making the request manually (opening `http://localhost/icons/google.com/icon.png` in the browser). About your issue, does `www.google.com` work for you? By default we act as a proxy cache for the official icons service (at `icons.bitwarden.com`), so we don't do anything special.
Author
Owner

@mprasil commented on GitHub:

That's weird, the icons show just fine for me:

image

Anything relevant in the logs? Do you see any files in the icon_cache folder? (this folder should be besides the DB file by default)

@mprasil commented on GitHub: That's weird, the icons show just fine for me: ![image](https://user-images.githubusercontent.com/8255364/42134464-2c7a96d6-7d34-11e8-9be3-3cc1c446631c.png) Anything relevant in the logs? Do you see any files in the `icon_cache` folder? (this folder should be besides the DB file by default)
Author
Owner

@mprasil commented on GitHub:

Both google.com and www.google.com works for me.

GET /icons/google.com/icon.png:
    => Matched: GET /icons/<domain>/icon.png
Downloading icon for https://icons.bitwarden.com/google.com/icon.png...
    => Outcome: Success
    => Response succeeded.
GET /icons/www.google.com/icon.png:
    => Matched: GET /icons/<domain>/icon.png
Downloading icon for https://icons.bitwarden.com/www.google.com/icon.png...
    => Outcome: Success
    => Response succeeded.

Could there be some throttling somewhere, possibly on the icons.bitwarden.com side? I'd imagine if you import some sizable password library, the first time it loads, there's gonna be hundreds of requests created.

@mprasil commented on GitHub: Both google.com and www.google.com works for me. ``` GET /icons/google.com/icon.png: => Matched: GET /icons/<domain>/icon.png Downloading icon for https://icons.bitwarden.com/google.com/icon.png... => Outcome: Success => Response succeeded. GET /icons/www.google.com/icon.png: => Matched: GET /icons/<domain>/icon.png Downloading icon for https://icons.bitwarden.com/www.google.com/icon.png... => Outcome: Success => Response succeeded. ``` Could there be some throttling somewhere, possibly on the icons.bitwarden.com side? I'd imagine if you import some sizable password library, the first time it loads, there's gonna be hundreds of requests created.
Author
Owner

@dani-garcia commented on GitHub:

Well it's trying to download the icons for google.com and discord.com, so if the icons_cache folder doesn't exist is because either the download failed or the saving to file failed.

I've modified the code to print the error in case the download failed, which I imagine is probably the cause. If with the new version there aren't still any error messages, I guess the other posibility is a permissions problem.

@mprasil Yeah, that was very weird, so it's probably a problem with my browser cache.

@dani-garcia commented on GitHub: Well it's trying to download the icons for `google.com` and `discord.com`, so if the `icons_cache` folder doesn't exist is because either the download failed or the saving to file failed. I've modified the code to print the error in case the download failed, which I imagine is probably the cause. If with the new version there aren't still any error messages, I guess the other posibility is a permissions problem. @mprasil Yeah, that was very weird, so it's probably a problem with my browser cache.
Author
Owner

@Ryonez commented on GitHub:

The log shows this:
image

But the data folder is rather sparse. I only have this:
image

@Ryonez commented on GitHub: The log shows this: ![image](https://user-images.githubusercontent.com/16157130/42134669-a7254e52-7d94-11e8-966d-cf4fe05395dc.png) But the data folder is rather sparse. I only have this: ![image](https://user-images.githubusercontent.com/16157130/42134679-bc906272-7d94-11e8-88ba-386d40c74c76.png)
Author
Owner

@Ryonez commented on GitHub:

Sorry @dani-garcia, I only just noticed your post.

I changed it to www.google.com, there's been no changes.
Is there meant to be a icon folder in the data dir? If so I don't have one.

To help further, I'm using the docker service.

Edit, seems the page wasn't loading my end. >.<

@Ryonez commented on GitHub: Sorry @dani-garcia, I only just noticed your post. I changed it to `www.google.com`, there's been no changes. Is there meant to be a icon folder in the data dir? If so I don't have one. To help further, I'm using the docker service. Edit, seems the page wasn't loading my end. >.<
Author
Owner

@mprasil commented on GitHub:

@dani-garcia also a possibility, that creating the directory fails due to some FS permission issues, which then panics the call here before serving the icon to the client.

@mprasil commented on GitHub: @dani-garcia also a possibility, that creating the directory fails due to some FS permission issues, which then panics the call [here](https://github.com/dani-garcia/bitwarden_rs/blob/ea600ab2b84a4881daba70655d8c7aead83eb8d7/src/api/icons.rs#L86) before serving the icon to the client.
Author
Owner

@dani-garcia commented on GitHub:

Okay, i tried in Docker and there seems to be a problem with the HTTPS connections, I'll see what I can do.

@dani-garcia commented on GitHub: Okay, i tried in Docker and there seems to be a problem with the HTTPS connections, I'll see what I can do.
Author
Owner

@dani-garcia commented on GitHub:

I think I solved this, you should rebuild the docker container with the new changes.
If this works for you, please let me now!

@dani-garcia commented on GitHub: I think I solved this, you should rebuild the docker container with the new changes. If this works for you, please let me now!
Author
Owner

@Ryonez commented on GitHub:

Rebuild, or update? I use the docker image you make.

@Ryonez commented on GitHub: Rebuild, or update? I use the docker image you make.
Author
Owner

@mprasil commented on GitHub:

@dani-garcia this actually explains why it was working some time ago for me. I remember I had the same issue but it was first and foremost due to blocking any outgoing connections from bitwarden. Then I fixed that and it still didn't work, so I docker exec-ed into the container and installed curl to try the requests manually. As you'd probably figured out already, this installed certs as dependency and everything worked fine. (so I couldn't reproduce the issue) Bitwarden populated my icon cache and I haven't noticed it's not working since the cache was already there. 😄 What a tricky little bug.

@mprasil commented on GitHub: @dani-garcia this actually explains why it was working some time ago for me. I remember I had the same issue but it was first and foremost due to blocking any outgoing connections from bitwarden. Then I fixed that and it still didn't work, so I `docker exec`-ed into the container and installed `curl` to try the requests manually. As you'd probably figured out already, this installed certs as dependency and everything worked fine. (so I couldn't reproduce the issue) Bitwarden populated my icon cache and I haven't noticed it's not working since the cache was already there. :smile: What a tricky little bug.
Author
Owner

@Ryonez commented on GitHub:

Of course, the repo has your name.
I'm probably way more tired than I feel.

I'll update once I see it come though.

@Ryonez commented on GitHub: Of course, the repo has your name. I'm probably way more tired than I feel. I'll update once I see it come though.
Author
Owner

@Ryonez commented on GitHub:

Alright, updated the docker, and the icons are now present. Thank you very much for sorting this out!

Resolved by dfb348d630

@Ryonez commented on GitHub: Alright, updated the docker, and the icons are now present. Thank you very much for sorting this out! Resolved by dfb348d6303010c08b6ff4224da7be47ef268902
Author
Owner

@mprasil commented on GitHub:

@Ryonez You're actually using my image. The build is scheduled, but takes about 1h to finish on slow Docker servers.

@mprasil commented on GitHub: @Ryonez You're actually using my image. The build is scheduled, but takes about 1h to finish on slow Docker servers.
Author
Owner

@mprasil commented on GitHub:

You can follow the build status here.

@mprasil commented on GitHub: You can follow the [build status here](https://hub.docker.com/r/mprasil/bitwarden/builds/).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2393