2

I have a new computer, but I fail to get native notifications to work with Firefox. It works fine on the old machine. notify-send and Google Chrome work fine on the new machine, too.

I have installed sway (window manager) and mako via apt. libnotify4 is installed, too. mako is running. But when I send a notification (from https://www.bennish.net/web-notifications.html), the notification is displayed by Firefox directly (which is super annoying with a tiling window manager). This message is printed to the console:

(firefox:78314): libnotify-WARNING **: 18:23:58.963: Failed to connect to proxy

Could it be blocked by snap or apparmor? As I said, all other apps can send notifications just fine, so it must be a problem with my Firefox.

Purging and reinstalling Firefox didn't help.

iGEL
  • 446
  • 1
    Could be snap, and it is clear that reinstalling won't help. You could try installing the .deb version of Firefox, which may not have this issue (find in blogs how to replace the snap version by the version from the Mozilla PPA.) – vanadium Aug 19 '22 at 16:49
  • Thanks @vanadium - I installed Firefox from the Mozilla PPA and it worked fine. Make an answer out of it and I'll accept it. – iGEL Aug 20 '22 at 10:25
  • Thanks for the feedback. I wrote a short answer, linking to another post here that provides full instructions. – vanadium Aug 20 '22 at 11:00
  • Actually, I spoke too early. After a while, the messages came via the Firefox dialog again, not mako. I installed mako from source and for now it's working. Will report back if it broke. – iGEL Aug 20 '22 at 11:31
  • Is this working yet for you please? I'm still not getting Gnome notifications in the latest Snap version of Firefox – Richard Jun 11 '23 at 12:48
  • @Richard Yes, works all fine here without any fiddling. – iGEL Aug 17 '23 at 07:12

1 Answers1

3

The issue is related to Firefox being installed as a snap application by default starting with Ubuntu 22.04. The good news is that native messaging support for the snap will be implemented soon, but in the mean time, you can work around by removing the snap version and install a .deb version instead. This post shows how the .deb version of Mozilla can be installed, and how upgrades can be prevented from changing the .deb version to the snap version.

Thanks to user68186 for providing the link with the news (2022-07-29) this is being worked upon

Update 2022-08-24 Resolved in Firefox 104.0.3.

vanadium
  • 88,010
  • The beta version 104 of firebox can do this in snap. See this post https://www.omgubuntu.co.uk/2022/07/ubuntu-devs-fix-another-frustrating-firefox-snap-flaw – user68186 Aug 20 '22 at 11:35
  • @user68186, thanks! The link did not make it through, though. Could you provide it? It will be a useful addition to this anwser. – vanadium Aug 20 '22 at 11:37
  • 1
    Using the command sudo snap refresh firefox --beta works now. Or one can wait a few days for Firefox 104 snap version to be released. – user68186 Aug 20 '22 at 12:51
  • Updated with sudo snap refresh firefox and now they are working again (beta no longer needed): firefox 104.0-3 from Mozilla✓ refreshed – bigbear3001 Aug 24 '22 at 08:16