Mount namespace error message with snapd ver 2.55.3

Hello, I receive the following message when starting Firefox and Chromium from the command line with “snap run”

This is on 20.04.4

$ snap run firefox

update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/libreoffice/help /usr/share/libreoffice/help none bind,ro 0 0): cannot create directory "/usr/share/libreoffice/help": permission denied

Only happens the first time when starting via the command line and I can’t detect difference in the operation of the browsers. Reverting snapd to 2.54.4 eliminates the error message.

Should note that I uninstalled the Libreoffice packages from Focal/Main and installed the deb packages directly from Libreoffice.org. I also briefly installed and then uninstalled the Libreoffice snap at one time, but the performance was a bit laggy.

Hi, are you certain this is with 2.55.3? The problem was present in 2.55.2, but was later fixed in 2.55.3.

Can you run sudo /usr/lib/snapd/snap-discard-ns firefox and then confirm that you have 2.55.3 (run snap version) and run firefox again.

Yes, it was version 2.55.3 revision 15534. Here’s a screen shot:

I should note that I accidentally omitted the “–version” option from my first post. I’d been messing around with loading snaps in a background process at startup to see if it made any difference on snap launch times after a cold start.

Anyway, it doesn’t matter since I get same the message without the “–version” option. I also get these message too, but I figure they’re inconsequential. Gtk-Message: 10:34:48.742: Failed to load module “canberra-gtk-module” Gtk-Message: 10:34:48.746: Failed to load module “canberra-gtk-module” ATTENTION: default value of option mesa_glthread overridden by environment. ATTENTION: default value of option mesa_glthread overridden by environment. ATTENTION: default value of option mesa_glthread overridden by environment.

As I mentioned previously, I no longer have Libreoffice installed from Focal/Main on my system, so there no longer exists a /usr/share/libreoffice/help directory. Its in /opt/libreoffice7.3/help now.

Same here, newly upgraded to Ubuntu 22.04, but with slightly newer kernel.

Any workaround for this?

the message is harmless and does not actually affect any functionality (as stated in the first post as well), so there is not really anything that needs to be worked around here …

Slack doesn’t start for me with that message:

update.go:85: cannot change mount namespace according to change mount (/run/user/1000/doc/by-app/snap.slack /run/user/1000/doc none bind,rw,x-snapd.ignore-missing 0 0): cannot inspect "/run/user/1000/doc": lstat /run/user/1000/doc: permission denied

this is obviously completely different from not being able to map the libreoffice help directory, you should open a new topic instead of re-viving a 2y old one :wink:

Well, that message doesn’t appear anymore when starting Firefox or Chromium snaps from the command-line, but there’s still a related namespace bug with those apps as it relates to accessing Libreoffice and other locally installed documentation. In Libreoffice, selecting “Libreoffice Help” from the menu will bring up Firefox (or Chromium if that’s the selected default browser) with an access to file error message even though it has the correct URL to the help documentation in the address bar. To workaround this, you have to close the browser, open a terminal, and type

$ sudo /usr/lib/snapd/snap-update-ns firefox

And then it works! And the good news is is that the setting is persistent even through multiple login sessions while the computer is booted. Reboot and you have to apply the workaround again.

yes, that might be, but the new issue is definitely not related to this at all, but pointing to some issue with the XDG document portal (alongside with other known kernel specific issues in 22.10 that are also namespace related and could have caused the issue), i just wanted to prevent mixing different unrelated issues i the same thread ,

Ah, I see. gotcha. .

Hello, This information, might be usefull. I’ve encounter the same problem with a snap: “cannot change mount namespace according to change mount … permission denied”

I’ve found the problem. It’s quite odd.It s linked to AppArmor, it secure the snaps. In my Home directory in Linux I’ve replaced the default folder (images, music, videos, etc… ) with symlink with the same name pointing to other drives. Looks like that was causing security issue with AppArmor, I’ve removed the symlink and put back the folders, rebooted and the snap is now launching now. You can apply that solution to other snaps.