Closed Bug 1773510 Opened 2 years ago Closed 2 years ago

xdg-desktop-portal crash on Ubuntu 22.04 snap firefox blocks saving downloads nor screenshots to /home subfolders

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 101
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: nickname, Unassigned)

References

(Blocks 3 open bugs)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0

Steps to reproduce:

  1. Open Firefox
  2. Open a website.
  3. Take screenshot or click to download file.
  4. Save it.

Actual results:

Nothing happened. Screenshot nor file is saved to disk.

Expected results:

Files should be downloaded.

The Bugbug bot thinks this bug should belong to the 'Firefox::Screenshots' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Screenshots

I tried to reproduce this issue on my machine Ubuntu 22.04 using Firefox 101.0 and 101.0.1 but could not reproduce it. Every time I take a snapshot or download a file, screenshots/files are saved to Downloads folder or to a folder created by me on home/desktop.
If the issue is still reproducible on your end, can you please retest this using the latest Nightly build (https://nightly.mozilla.org/) using a new clean Firefox profile (https://goo.gl/AWo6h8) to eliminate the potential causes?

Flags: needinfo?(raulvior.bcn)
Flags: needinfo?(raulvior.bcn)
Flags: needinfo?(raulvior.bcn)

The problem is the profile you ship with the Snap. I'll paste the journalctl output here:

dbus-daemon[1734]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.33813' (uid=1000 pid=739958 comm="/snap/firefox/1443/usr/lib/firefox/firefox " label="snap.firefox.firefox (enforce)")
audit[739958]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=739958 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
kernel: audit: type=1400 audit(1655222776.003:190): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=739958 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
dbus-daemon[7175]: [session uid=1000 pid=7175] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' unit='xdg-desktop-portal-gtk.service' requested by ':1.78' (uid=1000 pid=8149 comm="/usr/libexec/xdg-desktop-portal " label="unconfined")
systemd[7157]: Starting Portal service (GTK/GNOME implementation)...
systemd[1]: Starting Hostname Service...
dbus-daemon[1734]: [system] Successfully activated service 'org.freedesktop.hostname1'
systemd[1]: Started Hostname Service.
audit[1734]: USER_AVC pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
audit: MAC_TASK_CONTEXTS subj_apparmor=unconfined
audit[1734]: USER_AVC pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
audit: MAC_TASK_CONTEXTS subj_apparmor=unconfined
audit[1734]: USER_AVC pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
audit: MAC_TASK_CONTEXTS subj_apparmor=unconfined
audit[1734]: USER_AVC pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
audit: MAC_TASK_CONTEXTS subj_apparmor=unconfined
kernel: audit: type=1107 audit(1655222776.099:191): pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
kernel: audit: type=1420 audit(1655222776.099:192): subj_apparmor=unconfined
kernel: audit: type=1107 audit(1655222776.099:193): pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
kernel: audit: type=1420 audit(1655222776.099:194): subj_apparmor=unconfined
kernel: audit: type=1107 audit(1655222776.099:195): pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
kernel: audit: type=1420 audit(1655222776.099:196): subj_apparmor=unconfined
kernel: audit: type=1107 audit(1655222776.099:197): pid=1734 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.33822" pid=739958 label="snap.firefox.firefox" peer_pid=741347 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
kernel: audit: type=1420 audit(1655222776.099:198): subj_apparmor=unconfined
dbus-daemon[7175]: [session uid=1000 pid=7175] Successfully activated service 'org.freedesktop.impl.portal.desktop.gtk'
systemd[7157]: Started Portal service (GTK/GNOME implementation).
xdg-desktop-portal-gtk[741346]: error: **
xdg-desktop-portal-gtk[741346]: Gdk:ERROR:../../../../../gdk/wayland/gdkwindow-wayland.c:4139:gdk_wayland_window_set_transient_for: assertion failed: (parent == NULL || gdk_window_get_display (window) == gdk_window_get_display (parent))
xdg-desktop-portal-gtk[741346]: Bail out! Gdk:ERROR:../../../../../gdk/wayland/gdkwindow-wayland.c:4139:gdk_wayland_window_set_transient_for: assertion failed: (parent == NULL || gdk_window_get_display (window) == gdk_window_get_display (parent))
systemd[7157]: xdg-desktop-portal-gtk.service: Main process exited, code=dumped, status=6/ABRT
systemd[7157]: xdg-desktop-portal-gtk.service: Failed with result 'core-dump'.
xdg-desktop-por[8149]: Backend call failed: Message recipient disconnected from message bus without replying

Flags: needinfo?(raulvior.bcn)

There's also this bug which reports the same issue as me: https://bugzilla.mozilla.org/show_bug.cgi?id=1767868

Can you share about:support ? snapd changes as well as snapd version ? distro version ?

xdg-desktop-portal-gtk[741346]: error: **
xdg-desktop-portal-gtk[741346]: Gdk:ERROR:../../../../../gdk/wayland/gdkwindow-wayland.c:4139:gdk_wayland_window_set_transient_for: assertion failed: (parent == NULL || gdk_window_get_display (window) == gdk_window_get_display (parent))
xdg-desktop-portal-gtk[741346]: Bail out! Gdk:ERROR:../../../../../gdk/wayland/gdkwindow-wayland.c:4139:gdk_wayland_window_set_transient_for: assertion failed: (parent == NULL || gdk_window_get_display (window) == gdk_window_get_display (parent))
systemd[7157]: xdg-desktop-portal-gtk.service: Main process exited, code=dumped, status=6/ABRT
systemd[7157]: xdg-desktop-portal-gtk.service: Failed with result 'core-dump'.
xdg-desktop-por[8149]: Backend call failed: Message recipient disconnected from message bus without replying

This makes me thinking the issue is not in Firefox itself.

Flags: needinfo?(raulvior.bcn)

Also you mention "/home subfolders", but is ambiguous. Are you referring to your $HOME/ subfolders or subfolders under /home, potentially outside of your own $HOME ? If it is the later, I fear this is limited on purpose by Snap, and not Firefox's fault.

To any $HOME with its respective user, of course.

Flags: needinfo?(raulvior.bcn)

Here are snap changes and snap connections:

58   Done    yesterday at 18:12 CEST  yesterday at 18:12 CEST  Disconnect firefox:etc-firefox-policies from :
59   Done    yesterday at 18:12 CEST  yesterday at 18:12 CEST  Connect firefox:etc-firefox-policies to snapd:system-files
60   Done    yesterday at 18:12 CEST  yesterday at 18:13 CEST  Disconnect firefox:dot-mozilla-firefox from :
61   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Connect firefox:dot-mozilla-firefox to snapd:personal-files
62   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Disconnect firefox:gsettings from :
63   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Connect firefox:gsettings to snapd:gsettings
64   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Disconnect firefox:removable-media from :
65   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Connect firefox:removable-media to snapd:removable-media
66   Error   yesterday at 18:15 CEST  yesterday at 18:18 CEST  Remove "firefox" snap
67   Done    yesterday at 18:18 CEST  yesterday at 18:20 CEST  Remove "firefox" snap
68   Done    yesterday at 18:20 CEST  yesterday at 18:20 CEST  Install "firefox" snap from "latest/stable" channel
69   Done    yesterday at 19:04 CEST  yesterday at 19:04 CEST  Connect firefox:network-observe to snapd:network-observe

snap connections:

Interface                 Plug                                      Slot                             Notes
appstream-metadata        snap-store:appstream-metadata             :appstream-metadata              -
audio-playback            chromium:audio-playback                   :audio-playback                  -
audio-playback            firefox:audio-playback                    :audio-playback                  -
audio-record              chromium:audio-record                     :audio-record                    -
audio-record              firefox:audio-record                      :audio-record                    -
avahi-observe             firefox:avahi-observe                     :avahi-observe                   -
bluez                     chromium:bluez                            :bluez                           -
browser-support           chromium:browser-sandbox                  :browser-support                 -
browser-support           firefox:browser-sandbox                   :browser-support                 -
camera                    chromium:camera                           :camera                          -
camera                    firefox:camera                            :camera                          -
content[gnome-3-38-2004]  chromium:gnome-3-38-2004                  gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     chromium:gtk-3-themes                     gtk-common-themes:gtk-3-themes   -
content[icon-themes]      chromium:icon-themes                      gtk-common-themes:icon-themes    -
content[sound-themes]     chromium:sound-themes                     gtk-common-themes:sound-themes   -
content[gnome-3-38-2004]  firefox:gnome-3-38-2004                   gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     firefox:gtk-3-themes                      gtk-common-themes:gtk-3-themes   -
content[icon-themes]      firefox:icon-themes                       gtk-common-themes:icon-themes    -
content[sound-themes]     firefox:sound-themes                      gtk-common-themes:sound-themes   -
content[gnome-3-38-2004]  snap-store:gnome-3-38-2004                gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     snap-store:gtk-3-themes                   gtk-common-themes:gtk-3-themes   -
content[icon-themes]      snap-store:icon-themes                    gtk-common-themes:icon-themes    -
content[sound-themes]     snap-store:sound-themes                   gtk-common-themes:sound-themes   -
cups-control              chromium:cups-control                     :cups-control                    -
cups-control              firefox:cups-control                      :cups-control                    -
desktop                   chromium:desktop                          :desktop                         -
desktop                   firefox:desktop                           :desktop                         -
desktop                   snap-store:desktop                        :desktop                         -
desktop-legacy            chromium:desktop-legacy                   :desktop-legacy                  -
desktop-legacy            firefox:desktop-legacy                    :desktop-legacy                  -
desktop-legacy            snap-store:desktop-legacy                 :desktop-legacy                  -
fwupd                     snap-store:fwupd                          :fwupd                           -
gsettings                 chromium:gsettings                        :gsettings                       -
gsettings                 firefox:gsettings                         :gsettings                       -
gsettings                 snap-store:gsettings                      :gsettings                       -
hardware-observe          firefox:hardware-observe                  :hardware-observe                -
home                      chromium:home                             :home                            -
home                      firefox:home                              :home                            -
joystick                  chromium:joystick                         :joystick                        -
joystick                  firefox:joystick                          :joystick                        -
network                   chromium:network                          :network                         -
network                   firefox:network                           :network                         -
network                   snap-store:network                        :network                         -
network-bind              chromium:network-bind                     :network-bind                    -
network-bind              firefox:network-bind                      :network-bind                    -
network-observe           firefox:network-observe                   :network-observe                 manual
network-status            snap-store:network-status                 :network-status                  -
opengl                    chromium:opengl                           :opengl                          -
opengl                    firefox:opengl                            :opengl                          -
opengl                    snap-store:opengl                         :opengl                          -
packagekit-control        snap-store:packagekit-control             :packagekit-control              -
password-manager-service  snap-store:password-manager-service       :password-manager-service        -
personal-files            chromium:chromium-config                  :personal-files                  -
personal-files            firefox:dot-mozilla-firefox               :personal-files                  -
removable-media           chromium:removable-media                  :removable-media                 -
removable-media           firefox:removable-media                   :removable-media                 -
screen-inhibit-control    chromium:screen-inhibit-control           :screen-inhibit-control          -
screen-inhibit-control    firefox:screen-inhibit-control            :screen-inhibit-control          -
snapd-control             snap-store:snapd-control                  :snapd-control                   -
system-files              chromium:etc-chromium-browser-policies    :system-files                    -
system-files              firefox:etc-firefox-policies              :system-files                    -
system-files              snap-store:hostfs-usr-share-applications  :system-files                    -
system-observe            snap-store:system-observe                 :system-observe                  -
system-packages-doc       chromium:system-packages-doc              :system-packages-doc             -
system-packages-doc       firefox:system-packages-doc               :system-packages-doc             -
u2f-devices               chromium:u2f-devices                      :u2f-devices                     -
u2f-devices               firefox:u2f-devices                       :u2f-devices                     -
unity7                    chromium:unity7                           :unity7                          -
unity7                    firefox:unity7                            :unity7                          -
upower-observe            chromium:upower-observe                   :upower-observe                  -
upower-observe            firefox:upower-observe                    :upower-observe                  -
upower-observe            snap-store:upower-observe                 :upower-observe                  -
wayland                   chromium:wayland                          :wayland                         -
wayland                   firefox:wayland                           :wayland                         -
wayland                   snap-store:wayland                        :wayland                         -
x11                       chromium:x11                              :x11                             -
x11                       firefox:x11                               :x11                             -
x11                       snap-store:x11                            :x11                             -
Attached file about:support

Added as an attachment about:support.

And about:support without processing.

Thanks, can you also share snap changes as well as snap info firefox ?

And can you repro by running in parallel /usr/libexec/xdk-desktop-portal -rv and share its output? Also maybe /usr/libexec/xdk-desktop-portal-gnome -rv

Flags: needinfo?(raulvior.bcn)

snap changes

ID   Status  Spawn                    Ready                    Summary
58   Done    yesterday at 18:12 CEST  yesterday at 18:12 CEST  Disconnect firefox:etc-firefox-policies from :
59   Done    yesterday at 18:12 CEST  yesterday at 18:12 CEST  Connect firefox:etc-firefox-policies to snapd:system-files
60   Done    yesterday at 18:12 CEST  yesterday at 18:13 CEST  Disconnect firefox:dot-mozilla-firefox from :
61   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Connect firefox:dot-mozilla-firefox to snapd:personal-files
62   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Disconnect firefox:gsettings from :
63   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Connect firefox:gsettings to snapd:gsettings
64   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Disconnect firefox:removable-media from :
65   Done    yesterday at 18:13 CEST  yesterday at 18:13 CEST  Connect firefox:removable-media to snapd:removable-media
66   Error   yesterday at 18:15 CEST  yesterday at 18:18 CEST  Remove "firefox" snap
67   Done    yesterday at 18:18 CEST  yesterday at 18:20 CEST  Remove "firefox" snap
68   Done    yesterday at 18:20 CEST  yesterday at 18:20 CEST  Install "firefox" snap from "latest/stable" channel
69   Done    yesterday at 19:04 CEST  yesterday at 19:04 CEST  Connect firefox:network-observe to snapd:network-observe

snap info firefox

name:      firefox
summary:   Mozilla Firefox web browser
publisher: Mozilla✓
store-url: https://snapcraft.io/firefox
contact:   https://support.mozilla.org/kb/file-bug-report-or-feature-request-mozilla
license:   unset
description: |
  Firefox is a powerful, extensible web browser with support for modern web application
  technologies.
commands:
  - firefox
  - firefox.geckodriver
snap-id:      3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
tracking:     latest/stable
refresh-date: yesterday at 18:20 CEST
channels:
  latest/stable:    101.0.1-1    2022-06-09 (1443) 170MB -
  latest/candidate: 101.0.1-1    2022-06-09 (1443) 170MB -
  latest/beta:      102.0b8-1    2022-06-15 (1462) 169MB -
  latest/edge:      103.0a1      2022-06-14 (1461) 180MB -
  esr/stable:       91.10.0esr-1 2022-06-10 (1447) 161MB -
  esr/candidate:    91.10.0esr-1 2022-06-09 (1447) 161MB -
  esr/beta:         ↑                                    
  esr/edge:         ↑                                    
installed:          101.0.1-1               (1443) 170MB -

/usr/libexec/xdk-desktop-portal -rv

XDP: load portals from /usr/share/xdg-desktop-portal/portals
XDP: loading /usr/share/xdg-desktop-portal/portals/gnome-shell.portal
XDP: portal implementation for gnome
XDP: portal implementation supports org.freedesktop.impl.portal.Access
XDP: loading /usr/share/xdg-desktop-portal/portals/gtk.portal
XDP: portal implementation for gnome
XDP: portal implementation supports org.freedesktop.impl.portal.FileChooser
XDP: portal implementation supports org.freedesktop.impl.portal.AppChooser
XDP: portal implementation supports org.freedesktop.impl.portal.Print
XDP: portal implementation supports org.freedesktop.impl.portal.Notification
XDP: portal implementation supports org.freedesktop.impl.portal.Inhibit
XDP: portal implementation supports org.freedesktop.impl.portal.Access
XDP: portal implementation supports org.freedesktop.impl.portal.Account
XDP: portal implementation supports org.freedesktop.impl.portal.Email
XDP: portal implementation supports org.freedesktop.impl.portal.DynamicLauncher
XDP: portal implementation supports org.freedesktop.impl.portal.Lockdown
XDP: portal implementation supports org.freedesktop.impl.portal.Settings
XDP: loading /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal
XDP: portal implementation for gnome
XDP: portal implementation supports org.freedesktop.impl.portal.Secret
XDP: Using gtk.portal for org.freedesktop.impl.portal.Lockdown in GNOME
XDP: providing portal org.freedesktop.portal.MemoryMonitor
XDP: providing portal org.freedesktop.portal.PowerProfileMonitor
XDP: providing portal org.freedesktop.portal.NetworkMonitor
XDP: providing portal org.freedesktop.portal.ProxyResolver
XDP: providing portal org.freedesktop.portal.Trash
XDP: providing portal org.freedesktop.portal.GameMode
XDP: providing portal org.freedesktop.portal.Realtime
XDP: Using gtk.portal for org.freedesktop.impl.portal.Settings
XDP: providing portal org.freedesktop.portal.Settings
XDP: Using gtk.portal for org.freedesktop.impl.portal.FileChooser in GNOME
XDP: providing portal org.freedesktop.portal.FileChooser
XDP: Using gtk.portal for org.freedesktop.impl.portal.AppChooser in GNOME
XDP: providing portal org.freedesktop.portal.OpenURI
XDP: Using gtk.portal for org.freedesktop.impl.portal.Print in GNOME
XDP: providing portal org.freedesktop.portal.Print
XDP: Using gtk.portal for org.freedesktop.impl.portal.Notification in GNOME
XDP: providing portal org.freedesktop.portal.Notification
XDP: Using gtk.portal for org.freedesktop.impl.portal.Inhibit in GNOME
XDP: providing portal org.freedesktop.portal.Inhibit
XDP: Using gnome-shell.portal for org.freedesktop.impl.portal.Access in GNOME
XDP: providing portal org.freedesktop.portal.Device
XDP: providing portal org.freedesktop.portal.WebExtensions
XDP: providing portal org.freedesktop.portal.Location
XDP: providing portal org.freedesktop.portal.Camera
XDP: Using gtk.portal for org.freedesktop.impl.portal.Account in GNOME
XDP: using org.freedesktop.impl.portal.Account at org.freedesktop.impl.portal.desktop.gtk

XDP: providing portal org.freedesktop.portal.Account
XDP: Using gtk.portal for org.freedesktop.impl.portal.Email in GNOME
XDP: providing portal org.freedesktop.portal.Email
XDP: Using gnome-keyring.portal for org.freedesktop.impl.portal.Secret in GNOME
XDP: providing portal org.freedesktop.portal.Secret
XDP: Using gtk.portal for org.freedesktop.impl.portal.DynamicLauncher in GNOME
XDP: providing portal org.freedesktop.portal.DynamicLauncher
XDP: org.freedesktop.portal.Desktop acquired
XDP: Running: snap routine portal-info 9419
XDP: Handling SaveFile

** (/usr/libexec/xdg-desktop-portal:11888): WARNING **: 17:29:27.916: Backend call failed: Message recipient disconnected from message bus without replying
XDP: Running: snap routine portal-info 12142
Flags: needinfo?(raulvior.bcn)

Thanks,

** (/usr/libexec/xdg-desktop-portal:11888): WARNING **: 17:29:27.916: Backend call failed: Message recipient disconnected from message bus without replying

makes me wondering if it is xdg-desktop-portal-gnome that failed, can you verify with /usr/libexec/xdk-desktop-portal-gnome -rv as well? Are you using Ubuntu's default GNOME setup? I'm wondering why you first logs mentions /usr/libexec/xdk-desktop-portal-gtk, on my system it seems to use /usr/libexec/xdk-desktop-portal-gnome rather

Flags: needinfo?(raulvior.bcn)

Ok, even trying to download directly to $HOME works here.

Ok, for some reason you have "windowProtocol": "wayland", i.e., pure wayland. The snap package should run using Xwayland. You might have some MOZ_ENABLE_WAYLAND=1 in your env, verify this?

Clearly, running the snap with MOZ_ENABLE_WAYLAND=1 I can repro some crash on xdg-desktop-portal.

Moving to Downloads API component. The screenshots extension just uses the browser.download.download API to save the image to disk.

Component: Screenshots → Downloads API
Product: Firefox → Toolkit

Ah yes, I enabled Wayland. Forgot to say that. Sorry :S

(In reply to Alexandre LISSY :gerard-majax from comment #19)

Clearly, running the snap with MOZ_ENABLE_WAYLAND=1 I can repro some crash on xdg-desktop-portal.

Flags: needinfo?(raulvior.bcn)

(In reply to [:nickname] Firefox User from comment #21)

Ah yes, I enabled Wayland. Forgot to say that. Sorry :S

(In reply to Alexandre LISSY :gerard-majax from comment #19)

Clearly, running the snap with MOZ_ENABLE_WAYLAND=1 I can repro some crash on xdg-desktop-portal.

That's fine, but can you re-verify if you still hit the issue once wayland is properly disabled ? Check windowing system in about:support, you should have xwayland rather than wayland.

Flags: needinfo?(raulvior.bcn)

With Wayland disabled the issue does not reproduce. Window protocol is Xwayland.

(In reply to Alexandre LISSY :gerard-majax from comment #22)

(In reply to [:nickname] Firefox User from comment #21)

Ah yes, I enabled Wayland. Forgot to say that. Sorry :S

(In reply to Alexandre LISSY :gerard-majax from comment #19)

Clearly, running the snap with MOZ_ENABLE_WAYLAND=1 I can repro some crash on xdg-desktop-portal.

That's fine, but can you re-verify if you still hit the issue once wayland is properly disabled ? Check windowing system in about:support, you should have xwayland rather than wayland.

Flags: needinfo?(raulvior.bcn)

Olivier, do we think this is a valid bug or mixing like that gets us in a state where we cannot really do anything ?

Flags: needinfo?(olivier)

That looks like a real bug to me, because sooner or later we will enable native wayland support by default in the snap, and we want this use case to work. However I do run firefox with MOZ_ENABLE_WAYLAND=1, and I'm not seeing this problem.

Raúl, can you share info on your host system (distro/version) and the version of the xdg-desktop-portal* packages that are installed?

Flags: needinfo?(olivier) → needinfo?(raulvior.bcn)

I'm using Ubuntu 22.04 LTS. Installed packages are:
xdg-desktop-portal-gtk/jammy,now 1.14.0-1build1
xdg-desktop-portal/jammy-updates,now 1.14.4-1ubuntu2~22.04.1

(In reply to Olivier Tilloy from comment #25)

That looks like a real bug to me, because sooner or later we will enable native wayland support by default in the snap, and we want this use case to work. However I do run firefox with MOZ_ENABLE_WAYLAND=1, and I'm not seeing this problem.

Raúl, can you share info on your host system (distro/version) and the version of the xdg-desktop-portal* packages that are installed?

Flags: needinfo?(raulvior.bcn)

Olivier, does the provided info in comment 26 help?

Component: Downloads API → Widget: Gtk
Flags: needinfo?(olivier)
Product: Toolkit → Core
Priority: -- → P3

(In reply to Marco Bonardo [:mak] from comment #27)

Olivier, does the provided info in comment 26 help?

It does confirm that the packages for the portal are the ones that are expected, and up-to-date. It doesn't tell me why the portal would be crashing, though.

Flags: needinfo?(olivier)

It now works. Firefox can store files to disk. Version 104.0.1. Recent APT updates (since last friday) don't show anything related to xdg portal nor snapd.

Thanks, I'm going to close that as fixed, maybe there was something stale on your system and an upgrade fixed it.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Summary: Ubuntu 22.04 snap firefox doesn't save downloads nor screenshots to /home subfolders → xdg-desktop-portal crash on Ubuntu 22.04 snap firefox blocks saving downloads nor screenshots to /home subfolders
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: