Hi. I’m new to snaps so please forgive me if I’m doing something stupid. I’ve just successfully packed my nodejs npm plugin snap using snapcraft and it successfully executes and runs properly on ubuntu 20.04 desktop. The problem lies when i install it on my ubuntu-core device. My nodejs app relies on a few apt packages that are defined In my stage-packages list, which looks like this:
stage-packages:
- net-tools
- ping
nodejs has no problem spawning arp -a from net-tools when running on my ubuntu desktop device, but when running on my ubuntu core device, I get a permission error:
that’s a bit overzealous
have you also connected all of them ?
apart from network and network-bind nothing of these will auto-connect …
it might also help to ssh into a second terminal and run snappy-debug from the snappy-debug snap, that should give you interface suggestions (or show that there is no known interface for a certain access your app tries to make) …
I believe the plugs and interfaces are only for snaps. not the apt packages I’m trying to access. At least thats what it seems reading the docs. Do you think classic confinement would be something to consider here?
you can not install classic confined snaps on Ubuntu Core (and it would fully defeat the purpose of Ubuntu Core, allowing unconfined execution of something)
the error you posted was from accessing something in /proc not from executing a binary …
ssh into your Ubuntu Core box, install the snappy-debug snap and run the shipped snappy-debug command (it will give you instructions what exactly to run on Ubuntu Core) while restarting your app … you should then see suggestions about required interfaces …