Open Bug 1882464 Opened 9 months ago Updated 3 months ago

Firefox should retry to use native GNU/Linux desktop notifications again

Categories

(Toolkit :: Alerts Service, enhancement)

Firefox 123
x86_64
Linux
enhancement

Tracking

()

People

(Reporter: jlp.bugs, Unassigned)

References

(Blocks 1 open bug)

Details

It can happen that the native GNU/Linux desktop notification service becomes unavailable for a short time. And if Firefox wants to show a notification during that moment it just gives up on using this native notifications system forever, and only showing its own notification popup windows which are quite intrusive (stealing focus and showing up in the middle of the screen), badly integrated into desktop. Firefox should retry checking for the native GNU/Linux desktop notifications system from time to time and resume using it when it becomes available again. Currently I have to restart Firefox so that the native notifications are being used again.

Steps to reproduce

  1. Start Firefox
  2. Wait for a notification to see it uses the native GNU/Linux desktop notifications system
  3. Kill the desktop shell (e.g. by running "kquitapp5 plasmashell" for KDE Plasma desktop)
  4. wait for notifications to see it uses Firefox ntoification popup windows
  5. Restart desktop shell (e.g. by running "plasmashell --replace" for KDE Plasma desktop)
  6. Wait for notifications

Actual result
All notifications still use Firefox popup windows for notifications until Firefox is restarted

Expected result
Firefox should notice that native GNU/Linux desktop notifications service is back and use it again it without restarting

NI @nalexander to help triage thanks!

Flags: needinfo?(nalexander)

Kagami -- thoughts? I know you were active in a similar area recently.

I will note that you might need not restart. If you toggle alerts.useSystemBackend on and off, does the situation recover? If not, it seems to me that we should make that work, which would allow to recover.

I'm going to put P3 (we should improve this, but not urgently) and S4 (since intermittently failing OS notification systems are surely not that wide spread).

Severity: -- → S4
Flags: needinfo?(nalexander) → needinfo?(krosylight)
Priority: -- → P3

Switching backend currently throws away the previous one, which makes things tricky as it forgets all notification data it opened. We should figure out some way to restore it anyway for browser restart case, so maybe worth revisiting after figuring that out.

Blocks: 1844433
Component: Messaging System → Alerts Service
Flags: needinfo?(krosylight)
Product: Firefox → Toolkit

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit BugBot documentation.

Priority: P3 → --
You need to log in before you can comment on or make changes to this bug.