Fresh install of Ubuntu 22.04 and Firefox snap still cannot download files

I cannot get a fresh install of the firefox snap on 22.04 to download files.

First reported here here but no response.

The versions are.

Snap version: firefox 103.0-1 1589 latest/stable
xdg-desktop-portal version: 1.14.3-0ubuntu2

This is what I did.

Install firefox snap and launch it. Then try a download.

Download does not start. No indications are given to the user. The following apparmor messages appear in syslog.

roger@dragon:~$ tail -f /var/log/syslog | grep 'DENIED.*firefox' -
Jul 29 09:41:34 dragon kernel: [ 3385.254321] audit: type=1400 audit(1659084094.968:111): apparmor="DENIED" operation="mkdir" profile="snap-update-ns.firefox" name="/usr/share/libreoffice/help/" pid=11063 comm="5" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
Jul 29 09:41:34 dragon kernel: [ 3385.254379] audit: type=1400 audit(1659084094.968:112): apparmor="DENIED" operation="open" profile="snap-update-ns.firefox" name="/var/lib/" pid=11063 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Jul 29 09:42:38 dragon kernel: [ 3448.310657] audit: type=1400 audit(1659084158.021:114): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=11037 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Jul 29 09:42:38 dragon kernel: [ 3448.311776] audit: type=1400 audit(1659084158.021:115): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=11037 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Jul 29 09:42:38 dragon kernel: [ 3448.372232] audit: type=1400 audit(1659084158.081:116): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=11037 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Download requested at this point.

Jul 29 09:42:38 dragon kernel: [ 3448.428296] audit: type=1107 audit(1659084158.137:117): pid=1229 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.173" pid=11037 label="snap.firefox.firefox" peer_pid=12351 peer_label="unconfined"
Jul 29 09:42:38 dragon kernel: [ 3448.428788] audit: type=1107 audit(1659084158.137:119): pid=1229 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.173" pid=11037 label="snap.firefox.firefox" peer_pid=12351 peer_label="unconfined"

This what I expected to happen.

Download started and shown on the UI.

I thought this was fixed a while ago. Maybe I have some residual config issues

Here is a grep for firefox related stuff in the apparmor policies.

roger@dragon:/etc/apparmor.d$ find . -type f -exec grep -i -n firefox {} \; -print
28:  # this should cover all firefox browsers and versions (including shiretoko
30:  /usr/bin/firefox Cxr -> sanitized_helper,
31:  /usr/lib{,64}/firefox*/firefox* Cx -> sanitized_helper,
./abstractions/ubuntu-browsers
10:  # have 'ix' to restrct access to what only firefox is allowed to do
./abstractions/ubuntu-browsers.d/mailto
5:  # firefox-notify
./abstractions/ubuntu-browsers.d/ubuntu-integration-xul
8:  # Text editors (It's All Text [https://addons.mozilla.org/en-US/firefox/addon/4125])
./abstractions/ubuntu-browsers.d/text-editors
208:  owner @{HOME}/.mozilla/firefox/profiles.ini r,
209:  owner @{HOME}/.mozilla/firefox/*/secmod.db r,
210:  # firefox < 58
211:  owner @{HOME}/.mozilla/firefox/*/cert8.db r,
212:  # firefox >= 58
213:  owner @{HOME}/.mozilla/firefox/*/cert9.db r,
./usr.lib.libreoffice.program.soffice.bin

Any ideas on how to fix this? Or is it still a bug?

well, just try adding a new (test)profile ā€¦ or create a temporary test user on your machine and try logging in as this ā€¦

Good idea. Thanks.

Good idea. I will give that a try.

Cheers,

Roger

This is driving me nuts. It worked in the new user. I switched back to my normal user, it failed again, but did not put any DENIED messages in the syslog! I am really at a loss now. Any suggestions gratefully received, or I will be switching to the ppa.

i doubt the PPA would help in any way, looks like something is messed up in your profile ā€¦

if you use the same profile i dont think it matters what kind of binary you run, they will likely all misbehave ā€¦ iā€™d try clearing the cache and all cookies for a start ā€¦

Thanks for the tip.

I used the Help ->More troubleshooting information->Refresh Firefox tool. Downloads now work perfectly, and I still have my bookmarks, history, etc.

One happy bunny now!

1 Like