I’ve built a Snapcraft app that launches initially with a GUI user interface and then, when the user registers the app and closes the interface, it runs in the background while displaying a tray icon. On reboot, it launches into the background with the tray icon displaying through the same command, no GUI necessary (apart from the tray icon, which can launch a GUI window when clicked). The user is not supposed to manually turn off the app, and they know and accept this when they install it. This is what they want.
The YAML command that launches the app is not currently defined in YAML as a daemon.
Recently, when a user tries to manually refresh to the latest version on Edge, they receive an error:
Cannot refresh: snap has running apps
It used to refresh with no difficulty. Now it won’t refresh at all. The user apparently has to manually turn off the app (which, as I said, they are not supposed to do) in order to refresh it.
I’m pretty sure this is a result of refresh-app-awareness
.
I tried adding refresh-mode: restart
to the app command in YAML, but when snapping it I received an error stating that refresh-mode
was only for daemons:
The property does not match the required schema: 'daemon' is a dependency of 'refresh-mode'
I tried setting daemon: simple
, but then the app command didn’t work at all.
I’d really rather not have to rewrite my entire app just so users can get updates like they used to!
Is there any way to turn off this new feature in my CORE-18 YAML, since the old way worked great for my app? If not, what do you recommend for my unique situation, where the user should not turn off the app and it is not defined in YAML as a daemon (nor do I seem to know how to make it work as a defined daemon)?
Thanks in advance!