Installation of snap with content snap as dependency

Hi, This is issue about the desktop application snaps which have content snaps dependencies.

Current way of installing such snaps is not what it should be like.

User installs snap for example

snap install red-app

Now red-app is desktop application which depends on qt513 content snap.
Snapd right now download red-app (~2Mb in size) and installs it and make it available to user without finishing the download of qt513 . Which is not a good way to handle snaps with content snaps.

As soon as the red-app snap is installed, an Desktop entry appears in the launcher section, (while the content-snap that the red-app need to run is still being downloaded).

User will run the app from launcher without having the idea that the content part runtime still being downloaded. He found that the app didn’t launched for him. he/she goes to store and start writing a false review of application.

Note that user’s don’t have any idea of these details and most of them don’t even know about all these techs going on in the background.
This behaviour need to be changed to make the process smooth.

Have you looked at using default-provider for your content interface plug? If you use default-provider then snapd should install the content snap your snap depends on before finishing the installation of your snap.

I know this, and have a perfectly working setup in snapcraft yaml. what i mean to say is that, when a user install a snap that have content-snap as dependency, snapd make the app available to user before installing the content snap.

This sounds like a bug, can you share your snapcraft.yaml for the two snaps?

Here is the consumer :

Here is the content snap :

These craft files installs app and content snap perfectly. Again what am saying is as user do sudo snap install olivia , snapd downloads and install consumer snap first and make it available to user space and then starts downloading content snap qt551.

Points to be noted here for cmd usage of snap command :

  • no mention about the app install will also download content snap.
  • no progress bar when downloading content snap after downloading and installing consumer.
  • consumer app is available in app launchers and system while the content snap is still being downloaded.

Points to be noted on GUI’s store fronts ex-(snap store, gnome softwares)

  • there is no mention of content snap required by app.
  • store fronts reports app is installing and do not show exactly what task is snapd doing ( downloading content-snap etc).

I can’t reproduce your issue, I just tried running snap install olivia and the qt551 snap was automatically installed before the snap install olivia command returned, and after it returned the content snaps were connected. We could perhaps change the UI to expose that another snap was installed during the installation of the olivia snap, but I don’t reproduce the bug you are describing.

What’s snap version for you? I am on core snap stable channel, version 2.43

Am not saying snapd won’t install content snap itself.
am saying it makes app available before the content snap gets installed. Many users reported me this via mail that app didn’t launched after install. This happened cause the qt551 snap was downloading and installing and user saw Olivia icon in their app menu and tried to launch it.

Can you be more specific about how the app is made “available”, as mentioned before the command to install the olivia snap does not return before the content snap is installed, so I don’t understand how this could happen. Perhaps there is a GUI bug in i.e. ubuntu/gnome-software where the install button doesn’t actually wait for snapd to finish the install change?

I don’t see this on my system, I am running ubuntu 20.04 and I don’t see the icon as being available until after the snap install olivia command returns (well most likely a second or two before, I didn’t do precise timing)

App launcher and app snap gets installed before it begins downloading content snap within the command. Yes command won’t return, but the app snap gets installed before completing downloading and installing content snap.