ubuntu / gnome-shell-extension-appindicator

Adds KStatusNotifierItem support to the Shell
https://extensions.gnome.org/extension/615/appindicator-support/
GNU General Public License v2.0
1.16k stars 155 forks source link

Unable to display SVG icon #262

Open pnickerson-cashstar opened 3 years ago

pnickerson-cashstar commented 3 years ago

Versions Distribution: Fedora 33 (Workstation Edition) Shell version: gnome-shell-3.38.2-5.fc33.x86_64 Extension version: gnome-shell-extension-appindicator-34-1.fc33.noarch Indicator: hushboard version 0+git.3374c8f, rev 20, https://snapcraft.io/hushboard

Steps to reproduce sudo snap install hushboard Start Hushboard from GNOME's search screen. Type something anywhere.

What I expect to happen Hushboard's icon to appear in the top bar, switching between muted and unmuted forms.

What happens instead Hushboard's icon is three dots, and does not change.

More info I get this in my journalctl:

Jan 08 11:58:44 pnickerson-fedora-t460 appindicatorsupport@rgcjonas.gmail.com[3659]: hushboard, Impossible to read image info from path '/snap/hushboard/20/hushboard/icons/muted-symbolic.svg': GdkPixbuf.PixbufError: Failed to recognize image format
Jan 08 11:58:44 pnickerson-fedora-t460 appindicatorsupport@rgcjonas.gmail.com[3659]: unable to update icon for hushboard

I get the same message about unmuted-symbolic.svg too.

The file appears to be OK:

[pnickerson@pnickerson-fedora-t460] [12:02:27] [~]
 $ ll /var/lib/snapd/snap/hushboard/20/hushboard/icons/muted-symbolic.svg
-rw-r--r--. 1 root root 2984 Jan  7 20:26 /var/lib/snapd/snap/hushboard/20/hushboard/icons/muted-symbolic.svg
[pnickerson@pnickerson-fedora-t460] [12:02:34] [~]
 $ file /var/lib/snapd/snap/hushboard/20/hushboard/icons/muted-symbolic.svg
/var/lib/snapd/snap/hushboard/20/hushboard/icons/muted-symbolic.svg: SVG Scalable Vector Graphics image

Eye of GNOME is able to open the SVG file fine.

I tried reproducing the issue in Looking Glass with GdkPixbuf's get_file_info_finish or get_file_info_async, but I'm really unfamiliar with JavaScript and couldn't get anywhere.

I have a couple other applications that have been stuck on three dot icons as well. I don't know if they're having the same cause, but I'll come back here with that info if I can figure it out.

proninyaroslav commented 3 years ago

Same here with Flatpak:

libretrack, Impossible to read image info from path '/app/libretrack/data/icons/app-icon.svg': GdkPixbuf.PixbufError: Failed to recognize image format

proninyaroslav commented 3 years ago

Most interestingly, it works great in Snap.

proninyaroslav commented 3 years ago

The same problem with png files.

3v1n0 commented 2 years ago

Mhm, I've tried locally with an indicator pointing to an absolute path, but really it works here...

This should not depend on the snap/flatpak environment as the file is opened using the shell environment. Not sure if some confinement could cause that, but normally the shell should be able to access to such files...

proninyaroslav commented 2 years ago

@3v1n0 I found out that it's impossible to access files from Flatpak. The only way out is to use the theme icon/GdkPixbuf array instead of absolute path.

pnickerson-cashstar commented 2 years ago

Some time in the past 9 months, the issue went away on my system. I don't know when. Here are my current versions:

Distribution: Fedora 34 (Workstation Edition) Shell version: gnome-shell-40.4-1.fc34.x86_64 Extension version: AppIndicator and KStatusNotifierItem Support version 41 Indicator: hushboard version 0+git.223b6f9, rev 24, https://snapcraft.io/hushboard

I still see "unable to update icon for hushboard" in journalctl when I first open hushboard, but no more after that and never "Impossible to read image info".