-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppImage has wrong magic header #750
Comments
Thanks a lot Sandro, i'll check it for next binaries, thanks again. |
I'd really appreciate fixed binaries. My SO has been wanting to do some Ice Studio stuff on her NixOS machine for awhile. Thanks so much for looking into this! :) |
Hi! @crabdancing and @SuperSandro2000, first of all thanks to both a lot for report this bug. I renew the AppImage build system and i think all its fine now! you could download the latest AppImage from https://downloads.icestudio.io If you try and give me feedback about if it works, i'm appreciate very much. thanks! |
Hey, I tried multiple versions and none of them worked: Earlier version gives me this, indicating that the binfmt feature isn't identifying the AppImage (wrong magic numbers):
Later version gives me:
Which is an improvement, I guess. But if I run other AppImages, e.g., Discord, it works fine, so I'm fairly sure it's not my system? |
Hi @NicoleKai what linux distribution are you using? thanks for the feedback! |
Excuse me! there is an error!! give me some time and i'm telling you! |
Hi @NicoleKai ! could you try the last wip? thanks! |
NixOS like me :) |
I've noticed a few other tiny things:
and then it coredumps with
which could be because of the bwrap inside appimage-run but I am not sure. When I start it with sudo, the program now opens. |
i'll try nixOS i debug in it your architecture is x86 or arm? |
Hi Sandro, i think the problem is that tha AppRun that we use is very old (in that time the developer takes an electron app example). our AppRun try to install mime types asociated to the appImage and execute commands like desktop-file-install, xdg-icon-resource, xdg-mime, y xdg-desktop-menu and some of this commands or operations maybe not exists or need root privileges. I don't know if you could redirect me to some documentation about how integrate AppImage into OS (file mime asociations for example). The previous packaging method was did it a long time ago and now i'm rewritting it and take my first contact with AppImage internals, thanks a lot for your help and experience. |
I had the same problem as NicoleKai. My system is |
tomorrow i'll have a new version to fix this. Thanks to both! |
Awesome. Thank you for your help, @cavearr :) |
Hello my nixos friends! I'm doing my research, I don't know Nixos very well, but with this I'm delving into it and it's amazing! thank you so much! Otherwise, I need to explore how to package our icestudio AppImage in Nix form and will probably explore how to upload it to the nixo package store for easier installation. In the meantime I explore this and learn how to do it (the problem is with the nwjs core which uses external dependencies and this is a problem in nixos). I have been able to run it without problems and without sudo with appimage-run I install the package as a normal user: nix-env -iA nixos.appimage-run and then run icestudio: appimage-run icestudio-XXXXXXXXX-linux64.AppImage where XXXXXXXX is the version number If you could try it and confirm that this way it works on NixOS for the moment while I work to get a better solution. Thank you very much to all |
Actually, the Nix store contains scripts for packaging AppImages as native packages, once they're created. It's not ideal (less package customizability) but it works pretty well. A fair few NixOS packages are actually just pulled from AppImages. If you can get the AppImage itself working, I would be happy to make a standalone flake for further testing & upstreaming into For a little background, from the log you can see that NicoleKai's using the AppImage binfmt feature. Under the hood, this works by configuring the Linux kernel to recognize the magic number of a binary format, and pass it to a shim/handler/interpreter/executor process. E.g., you could use this to run a Java In the context of AppImage, this passes the executable to programs.appimage.enable = true;
programs.appimage.binfmt = true; treats calling Sadly, I've tried to latest version too, and I got the same error NicoleKai did. (I also tried calling it with I hope that helps. Anyways, I would be willing to try again if you wish. Thanks again for looking into this. :) |
The latest wip AppImage is only AppImage without zipping it, as you tell me and read in appImage recomendations packaging :) i have installed nixOS with plasma desktop. How are your environment i need to reproduce your problem to fix it. Are you sure you try the latest wip from https://downloads.icestudio.io should be an AppImage , not a zip file. tell me how is your environment configured to clone it and reproduce your fail. And thank you to you to give me your feedback, i'm very interested icestudio works well in all environmnets without friction. |
All the AppImage files I see give me a zip file to unpack, so I'm not sure what's going on there. I see a few files that show up as '.error', so there might be something going wrong in the build process? Unfortunately, my system config is a little complicated (system flake spread across many different git repos on my private VCS) so it's kinda hard to share the whole thing. I can tell you that I'm running Plasma 6 on x86_64-linux 6.8.11 kernel:
My default shell is Fish. If you're having trouble reproducing the issue, I could try to throw together a minimal |
i'm checking it |
Sorry for the inconvenience. Github actions generate automatically the zip file from AppImage at download , trying to force appears work but fails at the end.. We are moving outside this but for the moment the download page depends on it. |
Hi again! If it's not a nuisance, could you try 0.11.3w202406050906 wip from https://downloads.icestudio.io/ with appimage-run for the moment and not sudo, and if it crash, could you run: strace appimage-run icestudio....... and send me the output? Thanks! |
It works! (on my nix machine) Great job :) |
Thanks! i'll try to reduce friction much more. Thanks again for your feedback! |
I can confirm it works on mine too. Thanks for your help, @cavearr Once it's integrated into Github CI, I'll prolly write a flake packaging it for Nix once I get some free time! |
Thanks to you! when i have the nix package ready i'm telling you in this thread. |
@crabdancing @cavearr hello! we (a group of Summer of Nix participants) are looking to help package icestudio! if it's possible to collaborate in packaging the now working Appimage, let us know what progress has been made, and we can help pick up from there. |
I don't think any progress has been made on my end, aside from several long-abandoned attempts from before the AppImage format was actually valid (I don't even remember where I put them). I have a fair bit of experience with Nix packaging, and now that the AppImage format is correct, my guess is that this package is gonna be pretty easy to package. ^w^ |
Since If you want to go with an explicit extraction-based approach, looking at something like freetube might help. Otherwise, if you want to go with the simplest possible approach and don't need much control, httpie-desktop may be instructive. |
I was curious about exactly how difficult it would be to do, so I went ahead and sketched out a package for it myself. The Nix flake can be found here, and the
I would also guess there are probably environment issues I haven't found yet, but they're probably an easy fix too. Anyways, that's a reasonable starting point for packaging this, I think. Good luck! :3 |
Hi my friends! sorry for my delay, i'm busy closing other prioritize tasks. Today i reopen this, i'm telling you with your advances or tests . All help or feedback is very welcome!! @jleightcap ,i'm not an expert on nix, in fact i'm learning now thanks to this issue (and is amazing!) all of your help about the nix creation could be cruzial. I'm telling you in the day and if you think how could we organized better to do this, tell me please. |
Ref NixOS/nixpkgs#316579
A correct AppImage file should have a magic header like
as described in https://github.com/AppImageCommunity/libappimage/blob/ca8d4b53bed5cbc0f3d0398e30806e0d3adeaaab/src/libappimage/utils/MagicBytesChecker.cpp#L45-L63
icestudio does not have that
grunt-appimage generates the appimage files incorrect, so other tools like binfmt on NixOS or appimage-run cannot detect that. Even the test files in https://github.com/Jesus89/grunt-appimage/blob/master/res/AppImage.32bit have the wrong header.
The text was updated successfully, but these errors were encountered: