Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: App Name is not available when using Portal Notifications #916

Open
4 tasks done
Crylia opened this issue Nov 24, 2022 · 14 comments · May be fixed by #1488
Open
4 tasks done

[Bug]: App Name is not available when using Portal Notifications #916

Crylia opened this issue Nov 24, 2022 · 14 comments · May be fixed by #1488
Labels
bug needs diagnosis Root cause of the issue needs to be diagnosed portal: notifications Notifications portal

Comments

@Crylia
Copy link

Crylia commented Nov 24, 2022

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

1.12.7

What Linux distribution are you using?

Pop!_OS

Linux distribution version

22.04

What architecture are you using?

x86_64

How to reproduce

  1. Use any app that sends a notification
  2. see it having no app name

Expected Behavior

Portal notifications should be able to show the app name

Actual Behavior

Portal notifications won't show the app name

Additional Information

I'm not sure if its possible to expose something to get it working (I couldn't find anything in the docs related to notifications). Its quiet annoying to have notifications without an app name.

@Crylia Crylia added the bug label Nov 24, 2022
@smcv smcv transferred this issue from flatpak/flatpak Nov 24, 2022
@GeorgesStavracas
Copy link
Member

Please be more specific. Which specific apps have you used that trigger this behavior, and what did you expect to see?

@Crylia
Copy link
Author

Crylia commented Dec 12, 2022

One example would be spotify, I would expect a notification to also contain the applications name, but it doesn't.

https://specifications.freedesktop.org/notification-spec/latest/ar01s09.html The freedesktop spec defines a "app_name" which is not set when using any application from within flatpak

@swick
Copy link
Contributor

swick commented Jan 3, 2023

Is the app flatpak, snap or host? Which portal backend do you use?

@Crylia
Copy link
Author

Crylia commented Jan 4, 2023

It would be a flatpak, a good example would be Spotify (app/com.spotify.Client/x86_64/stable)

@swick
Copy link
Contributor

swick commented Jan 9, 2023

This is very likely an issue with a specific backend + compositor. Which ones do you use? I suspect xdg-desktop-portal-gtk and not gnoms-shell?

https://github.com/flatpak/xdg-desktop-portal-gtk/blob/366d3349041c2e06658c7c5a8b5bfd5f345d8157/src/fdonotification.c#L348

@Crylia
Copy link
Author

Crylia commented Jan 9, 2023

How do I check/change the backend? I just use awesomewm with picom

@swick
Copy link
Contributor

swick commented Jan 11, 2023

ps ax| grep xdg-desktop-portal might be sufficient, otherwise check which component supports the notification interface in /usr/share/xdg-desktop-portal/portals/ or use dbus-monitor to figure out what gets called.

@Crylia
Copy link
Author

Crylia commented Jan 13, 2023

3239 ?        SNsl   0:00 /usr/libexec/xdg-desktop-portal
   3256 ?        SNsl   0:00 /usr/libexec/xdg-desktop-portal-gnome
   3265 ?        SNsl   0:00 /usr/libexec/xdg-desktop-portal-gtk
   3270 ?        SNsl   0:00 /usr/lib/x86_64-linux-gnu/libexec/xdg-desktop-portal-kde
  46431 pts/0    SN+    0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox xdg-desktop-portal

is the output from the first command, so ig I got three running?

@swick
Copy link
Contributor

swick commented Jan 13, 2023

Yes, each can provide a number of portals. the gnome backend doesn't implement notifications, gtk does and I don't know about KDE (it probably does). You can check in /usr/share/xdg-desktop-portal/portals/kde.portal if it implements the notification Interface.

If both gtk and kde do then you can use dbus-monitor "interface='org.freedesktop.impl.portal.Notification'" to figure out which one gets called.

@georg-mayer
Copy link

Hi, I have the exact same problem - it is with a flatpak spotify installation on kbuntu (KDE). The error is annoying, as an error sound is played after every song. From the answers so far I don't know how to resolve the problem. Did I miss something? Thanks for any help on this!

@GeorgesStavracas GeorgesStavracas moved this to Needs Triage in Triage Oct 2, 2023
@GeorgesStavracas GeorgesStavracas added needs diagnosis Root cause of the issue needs to be diagnosed portal: notifications Notifications portal labels Oct 11, 2023
@GeorgesStavracas GeorgesStavracas moved this from Needs Triage to Triaged in Triage Oct 11, 2023
@ray-kast
Copy link

Seconding this, I've been using xdg-desktop-portal-gtk with i3 for awhile and after a recent update to [email protected] and [email protected] notifications no longer have an attached app name. I've confirmed from using the above dbus-monitor command that xdg-desktop-portal-gtk is receiving the notifications.

@b3niup
Copy link

b3niup commented Sep 16, 2024

Same issue here with xdg-desktop-portal-gtk

@rpetti
Copy link

rpetti commented Oct 24, 2024

Noticed this with both the firefox and vencord flatpaks. Looks like app name isn't even a field in the portal notification spec, and there's no handling of it in the code, so I assume that's why it's coming across empty.

@A6GibKm
Copy link
Contributor

A6GibKm commented Nov 18, 2024

The error comes from libnotify: https://gitlab.gnome.org/GNOME/libnotify/-/blob/master/libnotify/notification.c#L479. This is because the app tries to tell libnotify the app name but this feature is not available if using the notification portal. Note that the app name is something that the backend and/or xdp should know, not something the app should declare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs diagnosis Root cause of the issue needs to be diagnosed portal: notifications Notifications portal
Projects
Status: Triaged
Development

Successfully merging a pull request may close this issue.

8 participants