Closed Bug 1883821 Opened 4 months ago Closed 3 months ago

snap can't connect to libnotify

Categories

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

Firefox 124
Desktop
Linux
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: lengau, Unassigned, NeedInfo)

References

(Blocks 1 open bug, )

Details

Attachments

(2 files)

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

Steps to reproduce:

  1. Open the Firefox snap from a terminal on Kubuntu 24.04
  2. Visit https://www.bennish.net/web-notifications.html
  3. Authorize notifications
  4. Show a notification

Actual results:

Notification window generated by Firefox, and on the terminal the following:

(firefox-beta:97451): libnotify-WARNING **: 23:35:21.859: Failed to connect to proxy

Expected results:

Notification sent through libnotify, using built-in desktop notifications.

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Blocks: snap
Priority: -- → P3

WFM on firefox stabe on 23.10 using GNOME.

Amin, can you verify on your side ?

Flags: needinfo?(bandali)
Flags: needinfo?(bandali)

I dont have a KDE-based Ubuntu VM to verify, but on 22.04 with beta it works.

Flags: needinfo?(bandali)

I've been told KDE with plasma 5.27.10 under 22.04.4 does reproduce, so the problem would rather be at kde/snap integration ?

Just installed a 24.04 Ubuntu, installed KDE (via kubuntu-desktop meta package), and it works (X11, I dont know if wayland should work with Plasma?)

ubuntu 24.04, kubuntu-desktop, plasma session (x11)

Weird. So the kubuntu-desktop did not pull Wayland support but after manually installing plasma-workspace-wayland I got it to login from GDM3. Under that session, I did saw the warning, but at the same time the notification was also displayed. This badly sounds like an integration issue on KDE side.

Based on the comments above and some more time to investigate, I believe this is a snapd bug, specifically: https://bugs.launchpad.net/snapd/+bug/2056696

Running snappy-debug alongside Firefox shows that the first attempt to create a notification gets an apparmor failure:

$ snappy-debug --recommend --only-snap=firefox
INFO: Following '/var/log/syslog'. If have dropped messages, use:
INFO: $ sudo journalctl --output=short --follow --all | sudo snappy-debug
= AppArmor =
Time: 2024-03-27T12:0
Log: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/freedesktop/Notifications" interface="org.freedesktop.Notifications" member="GetServerInformation" mask="send" name=":1.122" pid=810138 label="snap.firefox.firefox" peer_pid=771735 peer_label="plasmashell"
DBus access

Putting the snap into devmode (not recommended as it disables apparmor's sandboxing), snappy-debug shows the expected result:

= AppArmor =
Time: 2024-03-27T12:1
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="session" path="/org/freedesktop/Notifications" interface="org.freedesktop.Notifications" member="GetServerInformation" mask="send" name=":1.122" pid=820397 label="snap.firefox.firefox" peer_pid=771735 peer_label="plasmashell"
DBus access

= AppArmor =
Time: 2024-03-27T12:1
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="session" path="/org/freedesktop/Notifications" interface="org.freedesktop.Notifications" member="GetCapabilities" mask="send" name=":1.122" pid=820397 label="snap.firefox.firefox" peer_pid=771735 peer_label="plasmashell"
DBus access

= AppArmor =
Time: 2024-03-27T12:1
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="session" path="/org/freedesktop/Notifications" interface="org.freedesktop.Notifications" member="Notify" mask="send" name=":1.122" pid=820397 label="snap.firefox.firefox" peer_pid=771735 peer_label="plasmashell"
DBus access

= AppArmor =
Time: 2024-03-27T12:1
Log: apparmor="ALLOWED" operation="dbus_signal"  bus="session" path="/org/freedesktop/Notifications" interface="org.freedesktop.Notifications" member="NotificationClosed" name=":1.122" mask="receive" pid=820397 label="snap.firefox.firefox" peer_pid=771735 peer_label="plasmashell"
DBus access

As such I'm marking this as invalid since the bug isn't in Firefox (or the firefox snap)

Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: