2 posts / 0 new
Last post
snap issues on IoTR

Currently exploring the dev kit IoTR and learning to use and build for snap but I'm seeing some odd behaviour.

First issue: following the IoTEdgeRouter_2.5_guide.pdf I installed the hello-world snap but instead of the expected output I see an error message every time I try to run it.

snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks

Not sure what has gone wrong here or what can be done to fix it with the limited permissions of the dev user. The only solution I can find online suggests running "sudo apt purge snapd snap-confine" and then re-installing but obviously that's not possible with only the dev user.


Second issue: Cannot find snap I published which searching from the IoTR. In order to learn the ropes of snap I made a little "hello world" app and published it privately. On the Ubuntu VM I was using to create the snap I can run "snap find hello --private". I then went and logged into snap with the same account on the IoTR and running the same command returns 0 results. 

Moreover running a simple "snap find hello" without the private option returns very different results from my VM and on the IoTR. On the VM there are 62 results but running the exact same command on the IoTR returns just 13 results. Is the IoTR searching a different store than the default Snap Store described in the snap documentation?

The IoTR is ARMHF not an

The IoTR is ARMHF not an AMD64 architecture like your VM likely is.  

When you search on your VM for hello-world (or your snap built on a VM) it will return all of the AMD64 ones, whereas on the IoTR it will return the ARMHF ones.  There is no guarantee that everyone creating and publishing snaps are building for all architectures.

I strongly advise you to use the cloud based build server for snaps: https://build.snapcraft.io/

It will build and then publish multiple architectures automatically from your github repository.

It's what I use.

David Howard

P.S. until the build is promoted from edge to stable it will not be visible

sudo snap install --edge chuck-norris-webserver-dhoward

should install on VM or IoTR  (it's a simple web server example)  https://tutorials.ubuntu.com/tutorial/build-a-nodejs-service?backURL=%2F#0

goto https://tutorials.ubuntu.com/ and search for SNAP for several tutorials on SNAP packaging...

Good Luck!