Snap suddenly stopped working, apparmor related?

hi all,

My snap recently stopped working. I have nextcloud running in an LXD. It seems when I do snap logs nextcloud.apache it is complaining about apparmor. How do I enable / install it? Am I even on the right track? Cheers for any help!

dom@ubuntu-lxd-nextcloud-snap:~$ sudo snap logs nextcloud.apache
2023-12-30T22:15:58Z nextcloud.apache[1857]: missing profile snap-update-ns.nextcloud.
2023-12-30T22:15:58Z nextcloud.apache[1857]: Please make sure that the snapd.apparmor service is enabled and started
2023-12-30T22:15:58Z nextcloud.apache[1766]: snap-update-ns failed with code 1
2023-12-30T22:15:58Z systemd[1]: snap.nextcloud.apache.service: Main process exited, code=exited, status=1/FAILURE
2023-12-30T22:15:58Z systemd[1]: snap.nextcloud.apache.service: Failed with result 'exit-code'.
2023-12-30T22:15:58Z systemd[1]: snap.nextcloud.apache.service: Scheduled restart job, restart counter is at 5.
2023-12-30T22:15:58Z systemd[1]: Stopped Service for snap application nextcloud.apache.
2023-12-30T22:15:58Z systemd[1]: snap.nextcloud.apache.service: Start request repeated too quickly.
2023-12-30T22:15:58Z systemd[1]: snap.nextcloud.apache.service: Failed with result 'exit-code'.
2023-12-30T22:15:58Z systemd[1]: Failed to start Service for snap application nextcloud.apache.

Some follow up information… when I do systemctl status snapd.apparmor it seems to fail because of something to do with the container?

â—Ź snapd.apparmor.service - Load AppArmor profiles managed internally by snapd
     Loaded: loaded (/lib/systemd/system/snapd.apparmor.service; enabled; vendor preset: enabled)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (exited) since Sat 2023-12-30 22:12:05 UTC; 12min ago
   Main PID: 165 (code=exited, status=0/SUCCESS)

Dec 30 22:12:05 ubuntu-lxd-nextcloud-snap snapd-apparmor[165]: main.go:166: Inside container environment without internal policy
Dec 30 22:12:05 ubuntu-lxd-nextcloud-snap systemd[1]: Finished Load AppArmor profiles managed internally by snapd.

Hello!

Have you found a solution?

I had the same problem, in the same environment, reinstalled and then it worked again.

I only chose this way because I wasn’t actively using nextcloud yet.

Regards!