caprine icon indicating copy to clipboard operation
caprine copied to clipboard

Notifications not working on new design

Open intpg opened this issue 3 years ago • 31 comments

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.

intpg avatar Feb 17 '21 23:02 intpg

Same issue on windows and OSX.

bycEEE avatar Feb 18 '21 00:02 bycEEE

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.

dusansimic avatar Feb 18 '21 09:02 dusansimic

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.

intpg avatar Feb 18 '21 15:02 intpg

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.

dusansimic avatar Feb 18 '21 16:02 dusansimic

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.

intpg avatar Feb 18 '21 17:02 intpg

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.

DarekSz avatar Mar 11 '21 21:03 DarekSz

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?

ErebosGR avatar Mar 18 '21 02:03 ErebosGR

@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.

dusansimic avatar Mar 18 '21 07:03 dusansimic

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.

7system7 avatar Mar 18 '21 08:03 7system7

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.

MaxiM-PL avatar Apr 04 '21 08:04 MaxiM-PL

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

maxoku avatar May 03 '21 09:05 maxoku

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

ahuj9 avatar May 21 '21 20:05 ahuj9

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.

kimcosmos avatar May 30 '21 12:05 kimcosmos

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.

cool00geek avatar Aug 19 '21 06:08 cool00geek

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!

7system7 avatar Aug 19 '21 07:08 7system7

Will the badges be restored at least?

maxoku avatar Aug 19 '21 11:08 maxoku

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?

cool00geek avatar Aug 19 '21 16:08 cool00geek

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 .

kimcosmos avatar Aug 22 '21 12:08 kimcosmos

so How can I solve this problem?

MineEric64 avatar Nov 21 '21 12:11 MineEric64

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.

maxoku avatar Nov 21 '21 12:11 maxoku

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.

MineEric64 avatar Nov 21 '21 18:11 MineEric64

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

drkui avatar Nov 26 '21 18:11 drkui

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.

KingArthur3 avatar Feb 09 '22 19:02 KingArthur3

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
  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.

dotpointer avatar Feb 21 '22 18:02 dotpointer

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

maxoku avatar Mar 20 '22 13:03 maxoku

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

maxoku avatar Mar 21 '22 18:03 maxoku

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.

KingArthur3 avatar Mar 25 '22 22:03 KingArthur3

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 avatar Apr 13 '22 15:04 mmatyas

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

mmatyas avatar Apr 13 '22 16:04 mmatyas

@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:

dotpointer avatar Jun 10 '22 16:06 dotpointer