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.
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.
This is still a issue with snapd, I was testing snaps on Linux mint 20 today and when i tried to install ksnip tool using “snap install ksnip” I noticed the same issue i.e, The app snap is made available to system before installation is completed. Notice in the following snapshot installation process triggered by command is still going on (snapd is downloading required content snap kde-framework) while the app snap ksnip is visible in menu.
This should be prohibited and the app should only be made available to user after the installation is completed. There are many cases when snapd is installing the snap in background (yes it do if user interface like snap-store is closed) user pop opens the menu and see the app icon thinks app is installed and when he clicks on it nothing happen since content snap is still being downloaded in background.
In some cases user reports this as issue to developer (I received mails in past), write a bad review in store that app is not launching (there are many reviews where users reporting lib-xxx-x.so is missing).
This does look like a bug indeed (cc @pedronis) This is snap changes for snap install ksnip.
Status Spawn Ready Summary
Done today at 09:09 CEST today at 09:09 CEST Ensure prerequisites for "ksnip" are available
Done today at 09:09 CEST today at 09:09 CEST Download snap "ksnip" (153) from channel "stable"
Done today at 09:09 CEST today at 09:10 CEST Fetch and check assertions for snap "ksnip" (153)
Done today at 09:09 CEST today at 09:10 CEST Mount snap "ksnip" (153)
Done today at 09:09 CEST today at 09:10 CEST Copy snap "ksnip" data
Done today at 09:09 CEST today at 09:10 CEST Setup snap "ksnip" (153) security profiles
Done today at 09:09 CEST today at 09:10 CEST Make snap "ksnip" (153) available to the system
Doing today at 09:09 CEST - Automatically connect eligible plugs and slots of snap "ksnip"
Do today at 09:09 CEST - Set automatic aliases for snap "ksnip"
Do today at 09:09 CEST - Setup snap "ksnip" aliases
Do today at 09:09 CEST - Run install hook of "ksnip" snap if present
Do today at 09:09 CEST - Start snap "ksnip" (153) services
Do today at 09:09 CEST - Run configure hook of "ksnip" snap if present
Do today at 09:09 CEST - Run health check of "ksnip" snap
Done today at 09:09 CEST today at 09:09 CEST Ensure prerequisites for "kde-frameworks-5-core18" are available
Doing today at 09:09 CEST - Download snap "kde-frameworks-5-core18" (32) from channel "stable" (3.46%)
Do today at 09:09 CEST - Fetch and check assertions for snap "kde-frameworks-5-core18" (32)
Do today at 09:09 CEST - Mount snap "kde-frameworks-5-core18" (32)
Do today at 09:09 CEST - Copy snap "kde-frameworks-5-core18" data
Do today at 09:09 CEST - Setup snap "kde-frameworks-5-core18" (32) security profiles
Do today at 09:09 CEST - Make snap "kde-frameworks-5-core18" (32) available to the system
Do today at 09:09 CEST - Automatically connect eligible plugs and slots of snap "kde-frameworks-5-core18"
Do today at 09:09 CEST - Set automatic aliases for snap "kde-frameworks-5-core18"
Do today at 09:09 CEST - Setup snap "kde-frameworks-5-core18" aliases
Do today at 09:09 CEST - Run install hook of "kde-frameworks-5-core18" snap if present
Do today at 09:09 CEST - Start snap "kde-frameworks-5-core18" (32) services
Do today at 09:09 CEST - Run configure hook of "kde-frameworks-5-core18" snap if present
Do today at 09:09 CEST - Run health check of "kde-frameworks-5-core18" snap
The task Make snap "ksnip" (153) available to the system is already done, while snapd is still downloading prerequisites. I’ll try to debug it further and propose a fix.
This is still not solved or maybe not being looked seriously. On Ubuntu 20.04.1
I installed an app called movian which is 5Mb in size but depends on some content snap. according to the software store frontend and snapd the app is installed and ready to launch (see the green launch button in storefront), snapd also made a desktop entry to launch the app in app menu. While the content snap is still being downloaded in the background.
When the user clicks on the ‘launch button’ or tries to launch the app from the menu, the app will fail since the dependency of the app (packed in the content snap) is still being downloaded.
Revising the bug quickly so this can get attention of snapd developers:
Install an desktop app that uses content snap for its runtime.
Observe the behaviour of snapd, it will download the app snap first, install it, make it available to system (desktop menus etc.), starts downloading content snap, intsalls it after some time (since they could be big).
While snapd is downloading the content snap user clicks on the desktop menu entry of app thinking it is installed. The app crashes without giving hint to user(due to missing libraries those are present in content snap). User think the app doesn’t work, he give 1 star rating to app and take other actions.
Here is a review by a user in store for my application, I have no control on this and its all snapd’s current behaviour. Please fix this.