Firefox Flatpak: No "activate" in Web Notification Popup
Categories
(Toolkit :: Alerts Service, defect, P3)
Tracking
()
People
(Reporter: argonvegell, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
278.82 KB,
image/jpeg
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0
Steps to reproduce:
-
Go to HTML5 Web Notifications Test - Bennish.net: https://www.bennish.net/web-notifications.html
-
Click on "Authorize" then "Allow," and press on "Show."
Actual results:
The Web Notification Popup appears, however, there is no "Activate" on it.
Expected results:
The Web Notification Popup should have "Activate" on it.
This doesn't affect the default install of Firefox on Xubuntu though.
I'm running Xubuntu 20.04 and attached to this bug report are screenshots of both the default install of Firefox on Xubuntu and the flatpak version of Firefox.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•3 years ago
|
Reporter | ||
Comment 2•3 years ago
|
||
UPDATE: Thanks to the assistance of Redditor u/chrisawi, we were able to find a workaround to this issue: https://old.reddit.com/r/flatpak/comments/109oahf/is_this_a_bug_with_firefox_or_a_permissions_issue/j404ewp/
Ideally xfce4-notifyd would support default actions, or at least do something useful with an empty action name.
I think I've found the source of the issue though. libnotify 0.8.0 uses the Notifications portal when running inside flatpak, and the name is getting lost during this translation.
As a workaround, you can try setting NOTIFY_IGNORE_PORTAL=1 for Firefox in Flatseal.
Using Flatseal, scroll to 'Environment' and click the '+' next to 'Variables' to add NOTIFY_IGNORE_PORTAL=1
to the new field.
Setting NOTIFY_IGNORE_PORTAL=1
fixing this issue.
Comment 3•1 years ago
•
|
||
On Steam Deck with KDE Plasma, clicking notifications gives no feedback to Firefox and NOTIFY_IGNORE_PORTAL=1 just makes Firefox fail to run libnotify backend and fall back to XUL one. Chrome has no problem, I wonder the difference. Both are in flatpak packages.
Stransky, do you have idea about how things can fail here?
Comment 4•1 years ago
|
||
Is Chrome run as X11 or Wayland? You may try to use Firefox on the same backend.
Is Firefox/Chrome running as a regular app or as a flatpak?
Comment 5•1 years ago
•
|
||
Both run as flatpak, and per flatseal the X11 fallback is disabled on Chrome, so I guess it's wayland by default. I also tried forcing Wayland via about:flags just in case.
On Firefox I guess MOZ_ENABLE_WAYLAND=1 means Wayland.
Comment 6•1 years ago
|
||
But notifications are opened by KDE Plasma in both cases which runs on Wayland, does it still matter that whether browsers are on X11/Wayland?
Comment 7•1 years ago
|
||
If libnotify library is missing Firefox fallbacks to XUL.
You may miss libnotify libraries for Firefox flatpak runtime so Firefox can't find them.
The relevant code is here:
https://searchfox.org/mozilla-central/rev/6bc0f370cc459bf79e1330ef74b21009a9848c91/toolkit/system/gnome/nsAlertsIconListener.cpp#99
may you run Firefox with dynamic linker ld.so logging? see https://man7.org/linux/man-pages/man8/ld.so.8.html
But I'm not sure how that works with flatpak.
Comment 8•1 years ago
•
|
||
Oh it does run libnotify backend, what I said in comment #3 only applies with extra NOTIFY_IGNORE_PORTAL=1
suggested by comment #2. The problem (without extra settings) is that, clicking notification does nothing (the notification does not close and click event does not trigger). XUL backend can receive click though.
Comment 9•1 years ago
|
||
See https://github.com/GNOME/libnotify/blob/master/libnotify/notify.c
NOTIFY_IGNORE_PORTAL comes from libnotify library directly so it's not related to Firefox itself.
So you say the issue here is that the notify can't be clicked on and it doesn't focus to Firefox then, right? But I don't think that's related to flatpak, looks like a general Firefox bug here.
Comment 10•1 years ago
|
||
I'm a bit confused. I tested both Chrome/Firefox with default libnotify backend and both are missing Activate button. Looks like the Activate comes from build-in XUL notifications. Or libnotify behaves differently on different environments.
Comment 11•1 years ago
•
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #9)
See https://github.com/GNOME/libnotify/blob/master/libnotify/notify.c
NOTIFY_IGNORE_PORTAL comes from libnotify library directly so it's not related to Firefox itself.So you say the issue here is that the notify can't be clicked on and it doesn't focus to Firefox then, right? But I don't think that's related to flatpak, looks like a general Firefox bug here.
The thing is that it's broken only with flatpak 🤔
(In reply to Martin Stránský [:stransky] (ni? me) from comment #10)
I'm a bit confused. I tested both Chrome/Firefox with default libnotify backend and both are missing Activate button. Looks like the Activate comes from build-in XUL notifications. Or libnotify behaves differently on different environments.
That's... uh, interesting...
Updated•7 months ago
|
Comment 13•7 months ago
|
||
As described in comment #2, the workaround is to add NOTIFY_IGNORE_PORTAL=1
for environment and also add org.freedesktop.Notifications
in Session Bus/Talks. (Without the latter it will just fall back to XUL as described in comment #3.)
Comment 14•7 months ago
|
||
I'm fully confused, so filed https://gitlab.gnome.org/GNOME/libnotify/-/issues/50 for help.
Comment 15•6 months ago
|
||
The severity field is not set for this bug.
:nalexander, could you have a look please?
For more information, please visit BugBot documentation.
Comment 16•6 months ago
|
||
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #3)
On Steam Deck with KDE Plasma, clicking notifications gives no feedback to Firefox and NOTIFY_IGNORE_PORTAL=1 just makes Firefox fail to run libnotify backend and fall back to XUL one. Chrome has no problem, I wonder the difference. Both are in flatpak packages.
Adding some context here, Chrome's implementation only uses non-portal org.freedesktop.Notifications regardless of being in flatpak or not, while libnotify tries to use portal when in flatpak.
Updated•5 months ago
|
Comment 17•3 months ago
•
|
||
There's a KDE Plasma fix landed to 6.4.1. Not sure there will be a backport to 6.3. It'll probably be out next month given their 4-month release cycle.
Comment 18•2 months ago
|
||
Confirmed the fix with KDE 6.4.1. Closing.
Description
•