Skip to content
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

How to use this package in 2024? #149

Open
Igloczek opened this issue May 7, 2024 · 10 comments
Open

How to use this package in 2024? #149

Igloczek opened this issue May 7, 2024 · 10 comments

Comments

@Igloczek
Copy link

Igloczek commented May 7, 2024

inb4 sorry for not following the issue template, but it's not necessarily an issue, just discussion

How to use this package in 2024?

  • It doesn't work with Snapcraft v8, that was released in December 2023
  • It doesn't produce a snap package that would be accepted by the Snap Store, because of sandbox issues found errors in file output: unusual mode 'rwsr-xr-x' for entry './project-name/chrome-sandbox' security-snap-v2_squashfs_files
  • There are no docs or guides stating that user is required to do anything besides installing the package, providing paths and running it, optionally customizing the Snapcraft config, but since there are no recommendations, I assume that clean Electron app, doesn't need any customization to work properly

I see a bunch of issues and PRs related to topic of sandboxing issues, it seems to be merged, but it doesn't work (at lest now), an no one ever in the comments confirmed it did, not even a single thumb up.

Is topic publishing app for Linux that niche, that no one care whether it works or not?

Is there some other user friendly (which means I don't have to get master degree in snapcraft.yaml to make a snap) way to publish Electron app as a Snap package or do I really have to do it like VS Code and handle everything manually, since no one maintains it anymore?

Copy link

welcome bot commented May 7, 2024

👋 Thanks for opening your first issue here! If you have a question about using electron-installer-snap, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@jdeniau
Copy link

jdeniau commented Oct 15, 2024

@Igloczek I am novice in snapcraft and electron snap here.

I tried very hard to make it work with electronforge, by patching a lot a files.
I finally handled to make the snap creation file works, but I'm stuck when publishing with the following error too:

Issues while processing snap:
- found errors in file output: unusual mode 'rwsr-xr-x' for entry './tiana-tables/chrome-sandbox'

I saw that #141 should have resolved this, and in fact the command output does contain the --no-sandbox

command: bin/electron-launch $SNAP/tiana-tables/Tiana Tables --no-sandbox

(in fact that is the same fix that vscode did in their code base).

But the file is still present in the snap package, and with the weird mode

image

I'm stuck too here if you ever find a way out !

@jdeniau
Copy link

jdeniau commented Oct 16, 2024

@Igloczek I saw that you did 👍
Does it means that you are still stuck too or did you find a way out of these?

@Igloczek
Copy link
Author

@jdeniau Stuck, just accepted the fact it's broken and probably never be fixed, because no one care.

@jdeniau
Copy link

jdeniau commented Oct 16, 2024

Did you publish using snapcraft.yaml file or did you drop snapcraft support?

@Igloczek
Copy link
Author

Shipping only .zip for linux users. Ain't great, but works.

@jdeniau
Copy link

jdeniau commented Oct 16, 2024

After investigating a little bit, it seems that vscode is publish behind the "classic" confinement.

If you try to install it without it, you get the following error talking about security sandbox

sudo snap install code
error: This revision of snap "code" was published using classic confinement and thus may
       perform arbitrary system changes outside of the security sandbox that snaps are
       usually confined to, which may put your system at risk.

       If you understand and want to proceed repeat the command including --classic.

I will try to make it work with the classic confinement too to see if I manage to do something ¯_(ツ)_/¯

@Igloczek
Copy link
Author

Igloczek commented Oct 16, 2024

i was trying the classic too, and it wasn't working either, but don't remember what was the exact reason

@jdeniau
Copy link

jdeniau commented Oct 16, 2024

OK with the classic, there is an issue with desktop-gtk3 as the snapcraft are not the same classic.yaml an strict.yaml.

But I did manage to make the "unusual mode 'rwsr-xr-x' for entry" disappear following this message on snapcraft forums 🎉

cd  out/make/snap/x64/
unsquashfs <appFile>_amd64.snap
chmod 755 ./squashfs-root/<appName>/chrome-sandbox
snapcraft pack ./squashfs-root
snapcraft push --release=latest/edge --verbose <filePath>.snap

It is now available here : https://snapcraft.io/tiana-tables

I still have issues though I need to handle :

  • the command in the snapcraft file is "Tiana Tables", but the file is named "tiana-tables"
  • I an on a Windows WSL and not on a proper Linux, so there is a lot of library missing, I will install a VM to test that

@Igloczek
Copy link
Author

are you still using forge and this package or just calling Snapcraft directly using handcrafted snapcraft.conf?

i do have a full Ubuntu 24.10 install, but as a VM inside Proxmox, and i'm facing bunch of issues when using this package

  • firstly it works only with Snapcraft 7.x, because there is hardcoded core18 (Ubuntu 18.04)
  • then it tries to use Multipass, which at least in my case doesn't work either (some weird errors related to QEMU + last log says that some directory is missing)
  • after switching to LXD (snap set snapcraft provider=lxd) it seems to be actually building some stuff, but then it fails because can't determine the source-type of the /out directory content provided as a source param

So right I can't even get to the place where I have any sort of Snap package, even a broken one, just on my local drive 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants