Issues of snapd on Ubuntu Touch

Hey party folks!

I’m here to share my experience with snapd and some behavioral mismatches during my implementation of a Snap Store frontend based on QML. There’s only two of them but I’d like to get some input, maybe reasonings, as well as offer help in making it work properly on Touch as well as the regular Snap Store frontend.

  1. snapd client disconnects cause immediate Undoings
  2. Snap installations and removals are slow

As you can probably tell, some of those might have deeply rooted reasons but I’m offering my points of view:

Regarding 1: Ubuntu Touch apps need to expect to be killed by the user at any time through a simple swipe gesture, no process traces allowed. This is due to spawning everything in a transient systemd user service, causing the client to be killed fully with snapd (seemingly) reacting to that as if the snap command was Ctrl-C’d.

Regarding 2: One reason the things are the way they are might be due to installations and removals not doing a whole-wipe operation but merely step-by-step connect slots and plugs, regenerating AppArmor, Seccomp and udev profiles and rules multiple times during an install/removal operation.

I’d welcome some input where to look or whether this gives you a hint towards fixing the problem. :slight_smile: