sindresorhus / caprine

Elegant Facebook Messenger desktop app
MIT License
7.04k stars 555 forks source link

Notifications not working on new design #1562

Closed intpg closed 1 year ago

intpg commented 3 years ago

Caprine 2.52.0, Windows 10 20H2 Visual notifications, sound notifications, badges aren't working. I removed everything from AppData/Roaming and reinstalled Caprine. Windows notifications for Caprine are enabled.

bycEEE commented 3 years ago

Same issue on windows and OSX.

dusansimic commented 3 years ago

Hi! Notifications are not working on new Messenger design since they are not implemented by Messenger website. Because we display reformatted notifications from the website, now we can't display any notifications because there isn't any. Once Messenger website adds notifications, we will add them to Caprine.

intpg commented 3 years ago

Can't Caprine just detect a new message itself to bring notification? There is always a new message ticker in the window, which could be an indicator.

dusansimic commented 3 years ago

The notifications are not really the same as a new message indicator. I've fixed the issue with tray indicator not turning blue for new messages and is waiting to be merged (I'd expect it in the next update).

The notifications need to have some content in them which would be the message that was received. In this comment I've mentioned that there would need to be reverse engineering and a lot of hacking put into just getting something to work (I can't say it will work well) and I don't really think it is worth while we have a lot of other features that need to be fixed because of the new design.

I'd rather wait for Messenger to implement notifications on the website than trying to add this feature by reverse engineering the whole websites communication system.

What could maybe be done is showing a simple "There is a new message" notification which would indicate a new message was received but it won't have any information about the message or the sender which would be expected.

intpg commented 3 years ago

Anything what would allow the user to see that there is any message awaiting would be useful. Either tray icon color, or general notification, that would be already helpful.

DarekSz commented 3 years ago

Anything what would allow the user to see that there is any message awaiting would be useful. Either tray icon color, or general notification, that would be already helpful. Anything that is easy to notice. Just black vs. blue tray icon is a bit to easy to miss for me. Tray icon blinking, red dot on taskbar icon (maybe with number of conversations that have new messages). Something noticeable.

ErebosGR commented 3 years ago

I've fixed the issue with tray indicator not turning blue for new messages and is waiting to be merged (I'd expect it in the next update).

As of v2.52.1, this doesn't seem to be fixed. Has it not been merged yet?

dusansimic commented 3 years ago

@ErebosGR the fix was merged and is available in the update (2.52.1). It's working on my machine so I have no idea whats going on. The tray icon should turn blue when there are some unread messages and turn gray when there are no unread messages. Anyways, I believe that this is an unrelated issue from notifications so it would be better to open a new issue regarding this than post here.

7system7 commented 3 years ago

Same issue here... currently, without this feature, the program is useless. :( I have Ubuntu 20.10 linux and I enabled everything for Caprine:

Screenshot from 2021-03-18 09-14-21

Screenshot from 2021-03-18 09-16-22

There is no error in syslog, neither in Caprine Devtools.... I have no idea what happened.

MaxiM-PL commented 3 years ago

So it's not even possible to make the app play a sound and/or show a generic notification as the tray icon turns blue? Anything would help. Tray changing color is easy to miss - especially with multiple screens.

maxoku commented 3 years ago

Badges stopped working again today, the same with the tray :/.

ahuj9 commented 3 years ago

A notification based on the new message ticker is badly needed as an interim solution

kimcosmos commented 3 years ago

When I unmuted messenger in the browser (FF) the audible notifications in Caprine worked (whether the browser was closed or open). https://www.facebook.com/messages/ chats ...menu /settings. Its not the general facebook notifications setting. That is different. Curiously whilst the browser is loading the messenger page, the notification sounds are off until it loads. When the browser messenger is also open I get 2 lots of notifications with different sounds. So they are independently actioned but the browser setting trumps the electron one.

cool00geek commented 3 years ago

Would it be possible to detect if the notification sound is playing, and if so send a desktop notification? Having the ability to see when a message arrives will be great, even if I can't see a message preview like pre-redesign. This would fill one of the biggest missing features in the new messenger.

7system7 commented 3 years ago

Time to uninstall it. :( Fortunately, I do not have to use messenger anymore. :)) If anybody have to use this sh.t, just a tip: Switch on the facebook notifications in your browser settings. Caprine is almost unusable w/o notifications since January.

But thank you for your work!

maxoku commented 3 years ago

Will the badges be restored at least?

cool00geek commented 3 years ago

just a tip: Switch on the facebook notifications in your browser settings. Caprine is almost unusable w/o notifications since January.

How would I go about doing this? Will this show notifications when I get a new message?

kimcosmos commented 3 years ago

Its on your facebook web page. Settings notifications. For some reason these settings over ride whatever you set in caprine. Notification settings in caprine do othing at all.

On Fri, 20 Aug 2021 at 02:41, Vinay V @.***> wrote:

just a tip: Switch on the facebook notifications in your browser settings. Caprine is almost unusable w/o notifications since January.

How would I go about doing this? Will this show notifications when I get a new message?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sindresorhus/caprine/issues/1562#issuecomment-902071377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6LQOOPA5HPVKZUXUHVTZLT5UX3ZANCNFSM4XZH6MSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

MineEric64 commented 2 years ago

so How can I solve this problem?

maxoku commented 2 years ago

Sound on new message started working again after new update, though it seems not working every time. Badges still don't work and that's the most essential feature needed.

MineEric64 commented 2 years ago

Sound on new message started working again after new update, though it seems not working every time. Badges still don't work and that's the most essential feature needed.

yeap, Sound on new message works for me but badge (notification rectangle box) doesn't work for me too.

drkui commented 2 years ago

Same issue for me on Windows 11. There's sound but no visual notifications even though I have everything enabled.

KingArthur3 commented 2 years ago

Hi! Notifications are not working on new Messenger design since they are not implemented by Messenger website. Because we display reformatted notifications from the website, now we can't display any notifications because there isn't any. Once Messenger website adds notifications, we will add them to Caprine.

I'm on linux and I get messenger notifications with a message preview when my firefox browser is open, however caprine only plays a sound without pushing any notifications.

dotpointer commented 2 years ago

Here is a workaround for the missing notifications in Caprine for Debian 11 with MATE Desktop and possibly other Linux desktop environments as well.

It reads the Caprine window title to find out if new messages has arrived as intpg hinted in https://github.com/sindresorhus/caprine/issues/1562#issuecomment-781429391.

On new messages it will print out a short message on a panel/taskbar. No message will be shown if the Caprine window is opened but in the background, but then the taskbar button itself will show if new messages has arrived.

How to install the workaround:

  1. Install x11-utils by running sudo apt update and then sudo apt install x11-utils.
  2. Create an empty file for the script at /home/your-username/caprine-check-messages for example.
  3. Fill it with the following script that looks for the Caprine window title:
    #!/bin/bash
    WNDTITLE=$(xwininfo -root -children|grep '"caprine" "Caprine"'|head -n1);
    WNDTITLE=$(echo $WNDTITLE|sed 's/.*[0-9]x[0-9a-z]* "\(.*\)": .*/\1/');
    if [ "$WNDTITLE" != "Messenger" ] && [ "$WNDTITLE" != "caprine" ]; then
    echo "$WNDTITLE";
    else
    echo "...";
    fi
  4. Make it executable by running chmod +x /home/your-username/caprine-check-messages.
  5. Right click on a panel and click Add to panel...
  6. Select Command in the list of applets and click Add+, you will get a clock added to the panel.
  7. Right click on the new clock and click Properties.
  8. In the Command field put the path to the script, /home/your-username/caprine-check-messages.
  9. Set the Interval (seconds) field to 15.
  10. Move the applet on the panel position as you want it.

The script is included in my dptools project/repository at https://github.com/dotpointer/dptools/blob/master/caprine-check-messages and I have been using it for over a year now.

maxoku commented 2 years ago

Notifications returned, but badges of unread messages still don't work.

maxoku commented 2 years ago

After update today clicking on notification doesn't bring to the message. So no badge fix and other thing was broken, nice update.

KingArthur3 commented 2 years ago

I'm on Arch linux using Caprine 2.54 and I don't get notifications, only sound feedback. My notifications are not muted in Caprine nor are they disabled by my system.

mmatyas commented 2 years ago

I do not have text notification neither on the web (including both facebook.com and messenger.com for a few weeks now) and neither in Caprine (despite that yes, notifications are enabled in FB's settings). Caprine doesn't change the tray icon's color either on new messages.

The only thing that does indicate a new message is the change in the window title, so I've tried dotpointer's solution – with no success, unfortunately. For me xwininfo -root -children doesn't return the window title, just a fixed "caprine" string. However, changing the command to xwininfo -tree -root | grep 'Messenger' fixed the issue. The only problem now is that the window title toggles every second between "(X) Messenger" and "X messaged you!", so this will still need some tweaking.

mmatyas commented 2 years ago

PS. If you're on *buntu + XFCE, the applet is called "Generic Monitor", provided by xfce4-genmon-plugin.

dotpointer commented 2 years ago

@mmatyas I tried to update with your suggestion for xwininfo. But matching on "Messenger" does not work well however as the text is changed every second when messages are available. It would be better to match on something else.

My line from xwininfo -tree -root | grep 'Messenger'|head -n1 is like this: 0x1000000 "Messenger": ("caprine" "Caprine") 1000x500+16+32 +2+10

"Messenger" is the part that alternates when messages are available. What does your say, especially for the "caprine" "Caprine" part?

I have noticed that a fix has been sent in for this bug, #1822, so this workaround may become obsolete. +1:

mmatyas commented 2 years ago

Well about a month ago even the title bar stopped updating for me, so these days I'm just using a portable Chrome with https://github.com/shivamgly/Google-Chrome-Portable-maker-for-linux

ghost commented 1 year ago

Here is a workaround for the missing notifications in Caprine for Debian 11 with MATE Desktop and possibly other Linux desktop environments as well.

It reads the Caprine window title to find out if new messages has arrived as intpg hinted in #1562 (comment).

On new messages it will print out a short message on a panel/taskbar. No message will be shown if the Caprine window is opened but in the background, but then the taskbar button itself will show if new messages has arrived.

How to install the workaround:

  1. Install x11-utils by running sudo apt update and then sudo apt install x11-utils.
  2. Create an empty file for the script at /home/your-username/caprine-check-messages for example.
  3. Fill it with the following script that looks for the Caprine window title:
#!/bin/bash
WNDTITLE=$(xwininfo -root -children|grep '"caprine" "Caprine"'|head -n1);
WNDTITLE=$(echo $WNDTITLE|sed 's/.*[0-9]x[0-9a-z]* "\(.*\)": .*/\1/');
if [ "$WNDTITLE" != "Messenger" ] && [ "$WNDTITLE" != "caprine" ]; then
  echo "$WNDTITLE";
else
  echo "...";
fi
  1. Make it executable by running chmod +x /home/your-username/caprine-check-messages.
  2. Right click on a panel and click Add to panel...
  3. Select Command in the list of applets and click Add+, you will get a clock added to the panel.
  4. Right click on the new clock and click Properties.
  5. In the Command field put the path to the script, /home/your-username/caprine-check-messages.
  6. Set the Interval (seconds) field to 15.
  7. Move the applet on the panel position as you want it.

The script is included in my dptools project/repository at https://github.com/dotpointer/dptools/blob/master/caprine-check-messages and I have been using it for over a year now.

Still working perfectly with version 2.57! I use the applet "CommandRunner" on Mint Cinnamon. It also works with the gnome extension "Executor" on Ubuntu.

mzso commented 1 year ago

It's been so long since notifications existed, what sort of notifications can I expect?

dusansimic commented 1 year ago

It's been so long since notifications existed, what sort of notifications can I expect?

Message notifications. There are a few edge cases in which notifications are not shown (for example, when the same emoji is sent multiple times, but that seems to be a very unusual case which is not that common) but it works fairly well thanks to Stratos' workaround.

It is possible that it would break a little bit sometime in the future since it relies on the structure of the UI (same goes for any other feature) but we'll try to fix those issues as fast as they occur and we can confirm them.

mzso commented 1 year ago

Such as the slide in notifications made via Windows? I guess that's okay if I actually sit in front of the monitor and aren't running anything in full screen. But a flashing taskbar button would be nice. And/or an (hopefully animated) indicator on the tray icon.

mzso commented 1 year ago

I had zero notifications since the notifications workaround. Does it look for english text or something? Because that's not the language facebook appears to me.

maxoku commented 1 year ago

Notifications worked for me after update, but today I checked and they don't work again.