I have exact the same issues with snap.
l0g0ff@ideapad ~ $ rambox
cannot query current apparmor profile: Invalid argument
l0g0ff@ideapad ~ $ sudo systemctl restart apparmor
Password:
l0g0ff@ideapad ~ $ rambox
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
(electron) 'getName function' is deprecated and will be removed. Please use 'name property' instead.
(electron) 'setBadgeCount function' is deprecated and will be removed. Please use 'badgeCount property' instead.
(electron) 'setZoomLevel function' is deprecated and will be removed. Please use 'zoomLevel property' instead.
So the rambox snap works after I restart the apparmor daemon. I already follow the snapd reinstall steps from @algent . After that the snap work immediately. But then I restart again and I have the same issue.
The restart workaround is working but somewhat unhandy.
If I can help to give some debug info please let me know what info is needed.
/edit it works after removing the rambox package also
$ sudo eopkg remove snapd
$ sudo eopkg it --reinstall snapd
$ sudo usysconf run -f
$ snap remove rambox
$ snap install rambox