Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications not working on new design #1562

Closed
intpg opened this issue Feb 17, 2021 · 37 comments · Fixed by #2051
Closed

Notifications not working on new design #1562

intpg opened this issue Feb 17, 2021 · 37 comments · Fixed by #2051

Comments

@intpg
Copy link

intpg commented Feb 17, 2021

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
Copy link

bycEEE commented Feb 18, 2021

Same issue on windows and OSX.

@dusansimic
Copy link
Collaborator

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 dusansimic changed the title Notifications not working Notifications not working on new design Feb 18, 2021
@intpg
Copy link
Author

intpg commented Feb 18, 2021

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
Copy link
Collaborator

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
Copy link
Author

intpg commented Feb 18, 2021

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
Copy link

DarekSz commented Mar 11, 2021

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
Copy link

ErebosGR commented Mar 18, 2021

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
Copy link
Collaborator

@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
Copy link

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.

@WolfVantage
Copy link

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
Copy link

maxoku commented May 3, 2021

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

@ahuj9
Copy link

ahuj9 commented May 21, 2021

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

@kimcosmos
Copy link

kimcosmos commented May 30, 2021

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
Copy link
Contributor

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
Copy link

7system7 commented Aug 19, 2021

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
Copy link

maxoku commented Aug 19, 2021

Will the badges be restored at least?

@cool00geek
Copy link
Contributor

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
Copy link

kimcosmos commented Aug 22, 2021 via email

@MineEric64
Copy link

so How can I solve this problem?

@maxoku
Copy link

maxoku commented Nov 21, 2021

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
Copy link

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
Copy link

drkui commented Nov 26, 2021

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

@KingArthur3
Copy link

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
Copy link

dotpointer commented Feb 21, 2022

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.

@maxoku
Copy link

maxoku commented Mar 20, 2022

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

@maxoku
Copy link

maxoku commented Mar 21, 2022

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

@KingArthur3
Copy link

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
Copy link

mmatyas commented Apr 13, 2022

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
Copy link

mmatyas commented Apr 13, 2022

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

@dotpointer
Copy link

@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
Copy link

mmatyas commented Jun 10, 2022

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
Copy link

ghost commented Apr 6, 2023

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
Copy link

mzso commented Sep 29, 2023

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

@dusansimic
Copy link
Collaborator

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
Copy link

mzso commented Sep 29, 2023

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
Copy link

mzso commented Oct 9, 2023

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
Copy link

maxoku commented Oct 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.