Open lighterowl opened 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.
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
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.
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.
Same issue here on Hyprland. Not sure how to fix it either...
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 :
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
which is what latest Chrome uses, this caused my WhatsApp to report this login as "Google Chrome (Linux)".Sadly, none of that worked. I ran
strace -ff
on thewhatsapp-nativefier
binary. There are nodlopen
calls reported to be found, which seems to indicate that neitherlibnotify.so
norlibappindicator3.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 inxfce4-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.