desktop icon indicating copy to clipboard operation
desktop copied to clipboard

The appimage install command for Linux stops working in 1.9b version

Open Espasant3 opened this issue 1 year ago • 12 comments

Captchas

  • [x] I have read the instructions.
  • [x] I have searched existing issues and avoided creating duplicates.
  • [x] I am not filing an enhancement request.

What happened?

Due to the error #3830 i am not able to update the installation via zsync so i uninstall and install each time to avoid problems.

It seems like the appimage.sh (https://updates.zen-browser.app/appimage.sh) script is no able to find the .desktop file or a png on the squashfs-root directory probably because they are missing from the package because the script doesn't seem to have changed since the last version and it worked perfectly.

Reproducible?

  • [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.

Version

1.9b

What platform are you seeing the problem on?

Linux (AppImage)

Relevant log output if applicable

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11310  100 11310    0     0   3467      0  0:00:03  0:00:03 --:--:--  3467
[i] ╔════════════════════════════════════════════════════╗
[i] ║                                                    ║
[i] ║    (ノ◕ヮ◕)ノ*:・゚✧  Zen Browser Installer            ║
[i] ║                                                    ║
[i] ║    Status: Zen Browser Not Installed               ║
[i] ║    zsync: Installed (Needed for Updates)           ║
[i] ║                                                    ║
[i] ╚════════════════════════════════════════════════════╝
[i] 
[i] (★^O^★) What would you like to do?
[i]   1) Install
[i]   2) Uninstall
[i]   3) Check for Updates
[i]   0) Exit
Enter your choice (0-3): 1
[i] 
[w] Downloading Zen from https://github.com/zen-browser/desktop/releases/latest/download/zen-x86_64.AppImage
[i] 
[i] Installing Zen Browser...
######################################################################################################################################################### 100.0%
[i] Install completed successfully!
Parallel unsquashfs: Using 8 processors
57 inodes (2492 blocks) to write

[=============================================================================================================================================/] 2549/2549 100%

created 56 files
created 19 directories
created 1 symlink
created 0 devices
created 0 fifos
created 0 sockets
created 0 hardlinks
mv: no se puede efectuar `stat' sobre '': No existe el archivo o el directorio

Espasant3 avatar Mar 08 '25 15:03 Espasant3

Hi, what you are using is not a tarball but the appimage, and you are using Zen's script to handle this.

If you want to install the AppImage thru the CLI I suggest that you use AM and you run am -i zen-browser or appman -i zen-browser, it will also add zen-browser to PATH.

AM will correctly use zsync to do delta updates with Zen browser as long as you also install appimageupdatetool with AM, otherwise it will default to do url comparisons to update.

The official script only uses zsync to check for updates (doesn't actually do any delta update) and has many bugs.

Samueru-sama avatar Mar 09 '25 09:03 Samueru-sama

You are absolutely right about the appimage (i was reading the README and i saw the part of "native tarball install" and i misread the command line and thought it was appimage.sh rather than install.sh).

But the problem is still there as the "official" way doesn't work at all which is weird because it used to work until now.

Espasant3 avatar Mar 09 '25 15:03 Espasant3

Ok, after extracting the new appimage, searching on the files and comparing with a older one (zen-specific.AppImage which may be a bit too old but the script worked with it) that i had downloaded i can confirm that the new appimage doesn't have the following files:

  • .desktop files: squashfs-root/zen.desktop
  • .png files: squashfs-root/zen.png, squashfs-root/icons/updater.png, squashfs-root/usr/share/icons/hicolor/128x128/apps/zen.png, squashfs-root/browser/chrome/icons/default/default64.png, squashfs-root/browser/chrome/icons/default/default128.png, squashfs-root/browser/chrome/icons/default/default32.png, squashfs-root/browser/chrome/icons/default/default48.png, squashfs-root/browser/chrome/icons/default/default16.png

This doesn't necessarily mean that all of these files are missing (as I said the appimage is old), but it may help developers figure out what is missing.

Espasant3 avatar Mar 09 '25 16:03 Espasant3

But the problem is still there as the "official" way doesn't work at all which is weird because it used to work until now.

but it may help developers figure out what is missing.

I think the official script is just going to be removed because this hasn't been the first issue related to that script. I was talking about that a few days ago here https://github.com/zen-browser/desktop/issues/2518#issuecomment-2702003566

i can confirm that the new appimage doesn't have the following files:

Those files are present in the new appimage. You cannot even make an appimage without a top level *.desktop file because appimagetool will error out.

Image

Samueru-sama avatar Mar 09 '25 17:03 Samueru-sama

Oh yeah, you are right about the zen.desktop and zen.png files, using your commands to find the files I have the same result. My problem came from using the exact same commands from the script without the maxdepth just in case: find squashfs-root -name "*.desktop" and find squashfs-root -name "*.png" and didn't find anything (which lead me to thinking that they were missing).

Image

Then I tried the same with the older appimage and the result was different:

Image

By the way, I have to make a very important clarification before going on and that is that my knowledge of appimages and, in general, of package formats is quite limited and I might say something that is already very obvious such as

Those files are present in the new appimage. You cannot even make an appimage without a top level *.desktop file because appimagetool will error out.

Espasant3 avatar Mar 09 '25 17:03 Espasant3

With the new version (1.9.1b) I tried again and it continues to not work at all. I have found the real problem (i think), it seems like the find command doesn't solve correctly the symlink to AppDir, so I tried using realpath and it solved it, leaving us with desktop_file=$(find "$(realpath squashfs-root)" -maxdepth 1 -name "*.desktop" | head -n 1) and icon_file=$(find "$(realpath squashfs-root)" -maxdepth 1 -name "*.png" | head -n 1) (the resulting commands) for the lines 165 and 169 of the appimage.sh script respectively.

Image

There is also another solution using the -L flag with the original find command: desktop_file=$(find -L squashfs-root -maxdepth 1 -name "*.desktop" | head -n 1) and icon_file=$(find -L squashfs-root -maxdepth 1 -name "*.png" | head -n 1), which also works.

If i knew where this file is I would try making a PR to solve it, but I don't have enough time to find it. Anyway, I hope this helps someone with the same issue and also helps the devs to fix it.

Espasant3 avatar Mar 12 '25 18:03 Espasant3

Image

Anyway, I hope this helps someone with the same issue and also helps the devs to fix it.

Thank you for this solution; it also worked for me. I was trying to see if it was a wrong usage of the find command, but I did not think about symlinks.

Alexis-Fouquet avatar Mar 12 '25 19:03 Alexis-Fouquet

By the way, I also came up with a solution for the zsync problem (which is at the end of the issue #3830) in case it also happened to you and you prefer to use zsync directly instead of installing over and over again. I apologize for referring to another issue but I prefer to avoid mixing concepts of different issues (although in this case there is some relation) so that people don't get confused.

Espasant3 avatar Mar 12 '25 19:03 Espasant3

If i knew where this file is I would try making a PR to solve it, but I don't have enough time to find it.

https://github.com/zen-browser/updates-server/blob/main/appimage.sh

By the way, I also came up with a solution for the zsync problem (which is at the end of the issue https://github.com/zen-browser/desktop/issues/3830) in case it also happened to you and you prefer to use zsync directly instead of installing over and over again.

The zsync updates are meant to be done with appimageupdatetool, last time I checked the script it was using the zsync file to find out if it needed to download the appimage again, that is it wasn't doing any delta update xd

If you want an idea of how that is done, check the install script of Zen at AM

Samueru-sama avatar Mar 12 '25 19:03 Samueru-sama

btw @Espasant3 since you are doing the fixes, you should know that you don't need to run --appimage-extract and then search the whole squashfs-root directory.

The appimage runtime already supports regexes when extracting, that is --appimage-extract *.desktop and --appimage-extract .DirIcon, so you can just do what AM does here to get the icon and .desktop, that way the whole appimage isn't extracted.

Samueru-sama avatar Mar 12 '25 21:03 Samueru-sama

I really appreciate your tips @Samueru-sama but I have to tell you that at the moment I don't have the knowledge (specifically related to appimages) nor the time to come up with a better/stronger solution. I was planning to just solve this issues quickly and leave it like this maybe until June/July or until I come across another problem.

Espasant3 avatar Mar 12 '25 22:03 Espasant3

Since they have already merged the PR in updates-server, and after having tested the installation with bash <(curl https://updates.zen-browser.app/appimage.sh), we can conclude that the issue is fixed

Espasant3 avatar Mar 13 '25 19:03 Espasant3