Introducing wpe-webkit-mir-kiosk snap

In the hope of reaching users of my snap through this channel: I’d like your feedback on a workaround for a specific issue this snap has had w.r.t. restarts after mir-kiosk refreshes.

(ping @ogra @ijohnson @alan_g @markus @rbaldauf @pachulo)

what’s the issue?

Currently, a refresh of mir-kiosk (which provides the display server for WPE WebKit Mir Kiosk) will cause WPE to vanish from the screen. When mir-kiosk restarts, WPE will log that it lost the Wayland compositor and … do nothing. WPE keeps running, but since the display context goes away intermittently, it won’t be rendered on the new mir context*. I’ve filed this as a probable bug over at the cog launcher repo.

*not 100% sure these are the right terms :upside_down_face:

proposed workaround

Add a daemon/service in the snap that runs once a day (preferably at nighttime) and manually restarts the browser. The included cogctl binary provides a restart command, which in concert with the restart-condition: always will restart the browser – or the helper service could just call snapctl restart on the browser service. Our Core-based device gadget currently restricts snap refreshes to a 3-5am window, so a forced browser restart at 5:15am should minimize the timeframe where WPE is in limbo state after a mir-kiosk refresh.

An issue with a timer-based snap service is that they currently cannot be disabled properly, see How to manage services with sockets/timers - #8 by ijohnson and Launchpad bug.

Any other thoughts or suggestions?