sidekick-feedback icon indicating copy to clipboard operation
sidekick-feedback copied to clipboard

Naming convention using white spaces causes invalid cache generation (gtk-update-icon-cache).

Open jacob-emery opened this issue 6 years ago • 2 comments

Please, provide the details below:

Did you verify whether this issue has already been reported here?

No

Tell us about the problem

There is a problem with the icon naming convention used by NativeScript Sidekick on GNU with Linux systems. The devs should avoid whites paces in the icons names. E.g. Icon=NativeScript Sidekick in the .desktop file should be renamed to Icon=NativeScriptSidekick. And also every file in hicolor should be renamed from NativeScript Sidekick.png to NativeScriptSidekick.png. Additionally, to avoid any problems I would also rename the desktop file, from NativeScript Sidekick.desktop to NativeScriptSidekick.desktop or NativeScript-Sidekick.desktop. Not all of the above steps are necessary, but for consistency it would be good to do so.

Which platform(s) does the issue occur on?

Linux (Arch Linux). I know the devs don't directly support Arch Linux, but this bug is probably also present on supported distributions (Ubuntu/Debian). If one updates the package gtk they will see this message:

gtk-update-icon-cache: The generated cache was invalid.
error: command failed to execute correctly

Provide the following version numbers that the issue occurs with:

  • Latest AUR verson.

  • Latest version downloaded from your server and then installed as follows:

# Install dpkg on Arch Linux
yay -S dpkg # 
# Install NativeScript SideKick
mdkir nativescript-sidekick
dpkg -x ./NativeScriptSidekick-amd64.deb nativescript-sidekick
sudo cp -r nativescript-sidekick/opt/* /opt
sudo cp -r nativescript-sidekick/usr/share/* /usr/share/

# Fancy Nativescript Icon, this is an optional step
sudo sed -i 's/Icon=NativeScriptSidekick/Icon=\/usr\/share\/icons\/hicolor\/64x64\/apps\/NativeScriptSidekick.png/g' '/usr/share/applications/NativeScript Sidekick.desktop'

(copied from https://github.com/NativeScript/sidekick-feedback/issues/49 - actually there is a an error in this code, because when we run sudo cp -r nativescript-sidekick/usr/share/* /usr/share/ then the icons in /usr/share/hicolor/NxX/apps/ are not of the type NativeScriptSidekick.png, but they include a space, i.e. NativeScript Sidekick.png). Actually the version downloaded from the AUR containsIcon='NativeScript Sidekick' (so there is also a more white space there) in the .desktop file. So there is a bit of confusion. All of this can be easily solved by changing the naming convention.

Tell us how to recreate the issue in as much detail as possible

Simply install the AUR app (or download the app and "install it properly" on your system, like above). You will see

gtk-update-icon-cache: The generated cache was invalid.
error: command failed to execute correctly

If you then reinstall the package gtk, or download a package such that it needs to regenerate the cache, the error will still be present. The only way to get rid of this bug (i.e. have a valid cache) is to remove white spaces from wherever possible when installing the app. But it would be way better if this approach would be taken from upstream.

Does this issue happen every time?

Yes.

Send the client logs

jacob-emery avatar Oct 05 '19 10:10 jacob-emery

@jacob-emery wanted to let you know that there is an upcoming fix which will; remove the whitespace from all names. Expect it in the upcoming new release of Sidekick.

NickIliev avatar Nov 14 '19 06:11 NickIliev

A big thanks for the fix, you can definitely close the issue now :)

manuel-plavsic avatar Mar 06 '20 14:03 manuel-plavsic