Issue with installing snap packages - "Sorry, home directories outside of /home needs configuration."

Hi,

I suddenly have issues installing snap packages with Ubuntu 24.04.3 LTS. It started with a failed firexox update some days ago (I think).

sudo snap refresh firefox 
error: cannot perform the following tasks: 
- Run post-refresh hook of "firefox" snap if present (run hook "post-refresh": 
----- 
Sorry, home directories outside of /home needs configuration. 
See https://forum.snapcraft.io/t/11209 for details. 
-----) 
[1] 15130 exit 1 sudo snap refresh firefox

But my home directory is in /home/myname. It’s not a symlink also.

ls -ld /home 
drwxr-xr-x 3 root root 4096 Nov  6  2024 /home

readlink -f /home/myname
/home/myname

getent passwd "$USER" | cut -d: -f6
/home/myname

passwd entry is: myname:x:1000:1000:myname:/home/myname:/usr/bin/zsh

snap version  
snap    2.71
snapd   2.71
series  16
ubuntu  24.04
kernel  6.14.0-29-generic

The root users home directory is /root

My root partition is encrypted via luks and secure boot is enabled because of dual boot with Windows, if this helps in any way

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme0n1     259:0    0 953.9G  0 disk  
|-nvme0n1p1 259:1    0   500M  0 part  /boot/efi
|-nvme0n1p2 259:2    0   128M  0 part  
|-nvme0n1p3 259:3    0 525.1G  0 part  
|-nvme0n1p4 259:4    0   9.5G  0 part  
`-nvme0n1p5 259:5    0 418.6G  0 part  
  `-rootfs  252:0    0 418.6G  0 crypt /

I tried setting sudo snap set system homedirs=/home with no success.

And I tried reinstalling firefox and then even snapd. Right now I can’t even install the snap-store, which is giving me the same error message “Sorry, home directories outside of /home needs configuration.”.

sudo apt install snapd -> works

sudo snap install hello-world -> works

sudo snap install snap-store
error: cannot perform the following tasks:
- Run configure hook of "snap-store" snap if present (run hook "configure": 
-----
Sorry, home directories outside of /home needs configuration.
See https://forum.snapcraft.io/t/11209 for details.
-----)
[1]    12979 exit 1     sudo snap install snap-store

Snap already worked on this same system.

I have no clue what is going on here. Any Ideas?