Snaps of GTK apps not showing notification

I have been maintaining a snap tube-converter for quite a while now. With it’s recent major changes and updates, the app now shows notifications to user. But, the snap doesn’t showup the notification. I have been trying to fix it, with dbus plug and adding packages like libnotify but nothing really worked. Kindly help, as this snap is very popular and people use it quite a lot. Also, it’s showing some Gdbus error when installed first time on an OS, but I didn’t faced it in my main machine(may be due to older installations).

This is given to me by an user. This is the repo

Kindly look into this asap @ogra @kenvandine @alexmurray. I already discussed about this with @kenvandine, but for a fast resolution I’m posting this in the forum. Thanks in advance.

For notifications you should plug the desktop interface.

It’s plugged in automatically. BTW, there is a dbus fix for this snap, so, now it needs human review. Kindly allow it.

I checked the most recent snap upload and couldn’t see the desktop plug listed. Anyway, I’ve granted use of the requested dbus name.

Doesn’t it auto-connect?

Okay, I checked a lot and seems like this issue is with almost every gtk app. I tried fragments, the flatpak version of it shows notifications, but the snap don’t. Same with this snap. Please help out.

It’s autoconnected but you have to specify it. It’s not going to be autoconnected when you don’t list desktop in your plugs.

It’s there, and notify-send works, but not gtk notifications. Check this.

But this is also not working.

the gnome extension automatically adds the desktop plug (and a few others that can bee seen with snapcraft expand-exensions), no need to separately specify it when there is extensions: [ gnome ]

Well something is really wrong, nowadays in all my snaps with gnome-42 and core22 base , the snaps wont autoconnect to gtk-common-themes:icon-themes automatically resulting in foreign cursors etc. i have to do this manually everytime i install my snaps P.S. i did tried forcing to connect by mentioning the plug in my snaps but still the same error, is there any way i force snaps to use the desired autoconnect plugs ??

One other thing to try is to look at the logs to see if your strict snap’s requests to send notifications are getting blocked by dbus rules. Some notification libraries may use the org.freedesktop.DBus.Introspectable interface on the org.freedesktop.Notifications bus to figure out the available methods and properties at runtime. And as far as I know, the desktop snap interface allows access to the org.freedesktop.Notifications interface (e.g. sending/closing notifications), but introspection is blocked for confined snaps.

There are no denials, and I’ve proved that snap itself isn’t causing a problem. More likely it is an issue with appId not matching the desktop file name, but that has never been an issue before. Perhaps something related to gtk4. I even ran the app outside of snap and it didn’t send notifications. I extracted the squashfs and run the binary. Same result.