frealgagu / archlinux.whatsapp-nativefier

18 stars 8 forks source link

Notifications for incoming messages don't appear despite notifications for reactions to messages working okay #31

Open lighterowl opened 1 year ago

lighterowl commented 1 year ago

Notifications aren't shown anymore, sadly I'm not sure when that started so can't really pinpoint a concrete upgrade that caused it. What I'm sure of is that this doesn't seem to be related to the build of whatsapp-nativefier or the Nativefier version used to build it, as installing older packages from the Release page of this repo doesn't fix anything.

What I've tried :

Sadly, none of that worked. I ran strace -ff on the whatsapp-nativefier binary. There are no dlopen calls reported to be found, which seems to indicate that neither libnotify.so nor libappindicator3.so are loaded by the process. A sound is still played when there's a message coming in so it seems like it's just the system notification that doesn't get displayed, i.e. the webapp is aware that there's a new message because it plays the sound.

Also, whatsapp-nativefier isn't registered at all in xfce4-notifyd settings which seems to suggest that it doesn't even try to send them.

For the record, notifications work okay when running directly in the official build of Chrome 113.0.5672.126.

lighterowl commented 1 year ago

Must be somehow related to webapp code after all. Adding this to the inject code (taken from https://github.com/electron/electron/blob/main/docs/fiddles/features/notifications/renderer/renderer.js) :

const NOTIFICATION_TITLE = 'Title'
const NOTIFICATION_BODY = 'Notification from the Renderer process. Click to log to console.'
const CLICK_MESSAGE = 'Notification clicked!'

new window.Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY })
  .onclick = () => { document.getElementById('output').innerText = CLICK_MESSAGE }

makes the notification show up when launching the application, and strace shows that /usr/lib/libnotify.so.4 is loaded by the process.

Unfortunately, notifications for incoming messages are still missing.

cristianmiranda commented 1 year ago

It's seems to be a problem with nativefier. I tried the following and works the same way, no notifications at all.

nativefier 'web.whatsapp.com'

I found this, tried it but didn't work: https://github.com/nativefier/nativefier/issues/1184

lighterowl commented 1 year ago

Strongly doubt that it's a problem with Nativefier itself as normal notifications (i.e. what I showed in the comment above) wouldn't work if that were the case.

lighterowl commented 1 year ago

Small update : notifications for reactions to messages seem to work just fine. Incoming messages themselves still don't appear.

What I described here also happens with lxqt-notificationd, so by now I'm pretty sure this is caused by the webapp code doing something funky.

marcosnigp1 commented 6 months ago

Same issue here on Hyprland. Not sure how to fix it either...