Cannot launch snap applications with cgroup v2

I came across this thread during my search for a solution for running ubuntu server 22.04 + firefox snap + geckodriver + python veenv + cron Similar or exactly the same as this post

Your reply was helpful, even if it did not apply to my use-case, because I am not supposed to have (by Ubuntu’s design) a running user-DBUS session , when I start scripts via cron.

I ended up removing the default firefox snap (has strict confinement) and installing the devmode snap with: snap install firefox --devmode

I do not recommend regular users to do this as per the documentation. However, this is enough for my use-case that involves running automated web checks on a set of websites for the next few decades

EDIT: 20220728-1224: there is another proposed solution in the post I linked, which involves using the linger feature of systemd/loginctl. It has much more appeal than using ‘devmode’ for production applications