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

MacOS: Messages marked as "read" when "received" when app not in focus #3310

Closed
Yoone opened this issue Apr 15, 2019 · 56 comments
Closed

MacOS: Messages marked as "read" when "received" when app not in focus #3310

Yoone opened this issue Apr 15, 2019 · 56 comments

Comments

@Yoone
Copy link

Yoone commented Apr 15, 2019

Bug Description

Messages are automatically marked as read when received, and I do not get a notification. I have verified the same behavior with two of my contacts.

Steps to Reproduce

  1. Have recipient open desktop app and leave in background
  2. Send message to recipient

Actual Result: Message is marked as "read" (full 2 circles) even though the recipient has the app in the background and didn't receive a notification.

Expected Result: Message should be marked as "received" (empty circles) and a notification should appear on the recipient's desktop + phone (if they have the mobile app).

Screenshots

This is after sending the message if the recipient has the desktop app open (my recipient has the app on OSX and Android, same versions as me, as detailed below).

image

Platform Info

Signal Version: 1.23.2

Operating System: OSX 10.14.4

Linked Device Version: Android 9

@scottnonnenberg-signal
Copy link
Contributor

So, to summarize: You're on Linux, and you have the window full-size but behind another window. A message comes in and is immediately marked read.

Does it happen if the window is minimized (either normally or to tray)? Or you have a different conversation open than the one the message comes in on?

@yuffington
Copy link

I am experiencing these exact symptoms as well. OS X 10.14.3, iPhone 7 iOS 12.1

Essentially, I'm not notified of new messages. My desktop does nothing. And my phone will play a brief ding, but there is no notification displayed or badge indication.

A debug log from period where this occurred:
https://debuglogs.org/7c034ed473a7b14dba5769a73f951fb01c1c5a67ec2a4f9160dc426d7ef3f0d6

@Yoone
Copy link
Author

Yoone commented Apr 16, 2019

So, to summarize: You're on Linux, and you have the window full-size but behind another window. A message comes in and is immediately marked read.

Does it happen if the window is minimized (either normally or to tray)? Or you have a different conversation open than the one the message comes in on?

I'm on OSX*

I indeed seem to receive notifications when app is in tray or when another conversation is selected.

@gmalmquist
Copy link

gmalmquist commented Apr 16, 2019

I'm also seeing this on OSX 10.14.3. My phone (Pixel 2 XL) is running Android 9.

Behavior is unchanged regardless of whether the desktop app is in focus.

This has been happening on and off for a week or two; for a while it seemed like I started getting notifications again if I restarted the desktop app, but it would soon stop working again (perhaps when the laptop is locked? or maybe just randomly, not sure)

@Yoone
Copy link
Author

Yoone commented Apr 17, 2019

I can confirm the behavior @gmalmquist is describing. Restarting the app sometimes seems to help. And I also was under the impression that locking (closing) the laptop was part of the issue.

@athomschke
Copy link

I've been observing the same behavior since a couple of weeks. My contacts confirm that messages they send me are automatically marked as read. I don't get any notification, neither on my phone nor on my Mac.

Signal Version: 1.24.0
Mac: macOS Sierra Version 10.12.6
Linked Device Version: Android 9

The bug also shows with an iOS as linked device.

Workaround:

  • If I disable the App on my mobile device, I get notifications on my Mac and the Messages are not automatically marked as read.
  • If I disable the App on my Laptop, I get notifications on my mobile device and the Messages are not automatically marked as read.

@Yoone
Copy link
Author

Yoone commented Apr 19, 2019

@scottnonnenberg-signal Is this enough information? If not, can you provide us with a list of what else you'd like to know?

@lehresman
Copy link

The exact same thing is happening for me as well.

Signal Version: 1.24.0
Mac: macOS Mojave Version 10.14
Linked Device Version: iOS 12.2

I also have noticed this only in the past few weeks. It never used to be a problem. I upgraded to v1.24 yesterday and hoped that would solve it, but I had it happen again this morning.

@mecavity
Copy link

Same issue for me on OSX (10.14)
Signal version: v1.24.1

@scottnonnenberg-signal
Copy link
Contributor

I spent some time today trying to repro this, but I couldn't get it to happen reliably. If the window with the conversation open was visible, but not in the foreground, messages don't get marked read automatically.

I did notice a little bit of weirdness when I alt-tabbed, or used exposé (as mentioned in this bug: #3313). I need to move on to other things - I could use some help tracking this down to a very specific set of actions.

Also: There's a high chance that the specific version of macOS makes a difference here. I'm testing on 10.14.4.

@lehresman
Copy link

Thanks @scottnonnenberg for trying to track it down. I have tried to find a pattern of what triggers it, but so far I haven't been able to. I do suspect that it is some interaction between the mobile app and the desktop client.

The times I have seen it happen, I have my phone locked beside me. A notification pops up on my iPhone's lock screen but immediately disappears. And I also get no notification at all in the desktop client.

90% of the time, everything works fine. So unfortunately I haven't yet figured out what is causing it to break the other 10% of the time. I'll keep my eyes open though.

@kaskavalci
Copy link

kaskavalci commented Apr 30, 2019

OSX (10.14.4)
Signal v1.24.1

Occasionally experiencing this while chatting with wife. I can see it's happening when my messages are almost immediately marked as read as if application is on focus.

@thornjad
Copy link

thornjad commented Apr 30, 2019

OSX 10.14.4
Signal 1.24.1

I am also experiencing this, and I have noticed that when I cmd+tab away from Signal, the input box stays selected with a blinking cursor. I speculate that maybe the app doesn't realize it isn't focused anymore? I haven't played with it enough to find any more of a pattern.

I also noticed that I will get notifications as expected for conversations other than the one I have open. Only the current conversation gives my this issue.

Correction: It's not when I cmd+tab, it happens when I switch desktops. Every time I switch to the desktop containing Signal, the message box focuses, even though the app itself is not focused.

@walkerdb
Copy link

walkerdb commented May 1, 2019

^^ same observation as the above. When I switch desktops back to the desktop with signal using a three-finger-swipe the messages are marked as read, even though the app itself is not in focus.

One observation: the text cursor also focuses in the signal message box when switching back to the signal desktop as well (as in, the message box has a blue outline and the cursor starts blinking), even when the app isn't currently active and the cursor previously wasn't focused.

Mac OS 10.14.4
Signal 1.24.1

I don't think that is all the cases where this can happen though -- I've seen messages marked as read when they shouldn't without desktop swapping or using expose, but haven't been able to track down any replicable cause for it yet.

@scottnonnenberg-signal scottnonnenberg-signal changed the title Messages directly marked as "read" when "received" and no notification is shown MacOS: Messages marked as "read" when "received" when app not in focus May 2, 2019
@julieces
Copy link

julieces commented May 2, 2019

OSX 10.14.4
Signal Desktop 1.24.1
iPhone XS
iOS 12.2
Apple Watch series 3
WatchOS 5.2

Hi! I'm also facing this issue. I can also add that the notification doesn't come through on my Apple Watch either when the desktop app automatically marks it as read.

@scottnonnenberg-signal
Copy link
Contributor

All: We're looking for the specific set of actions that cause this to happen. Version numbers are useful, but the exact set of steps you went through to get this to happen is what we need. Did you use Exposé? Did you CMD-Tab? Did you switch desktops? Or did you just use another app with Signal Desktop in the background?

@gmalmquist
Copy link

I never use Expose, personally. I alt-tab a lot, between Signal, Firefox, Chrome, Slack, IntelliJ, Terminal, etc. I have my laptop connected to an external monitor at work, and I was keeping signal up on my laptop screen while doing actual work on my external monitor.

@julieces
Copy link

julieces commented May 3, 2019

It happens for me just when I have the signal app running in the background and my laptop open. The notification comes through the Mac Notification Center in the top right of my screen but then marks the message as read and I don't see the notification on my phone or watch.

@thornjad
Copy link

thornjad commented May 3, 2019

I've been able to trigger this repeatedly in at least one way. Here's what I do:

  1. Click on (or put text into) the message box
  2. Focus another app on the same desktop as Signal
  3. Leave the desktop Signal is open on
  4. Return to desktop Signal is open on

Now, because a different app on that desktop was focused before leaving it (step 2), Signal does not have focus, but the message box is highlighted with a blinking cursor and marks messages as read.

@Yoone
Copy link
Author

Yoone commented May 6, 2019

@scottnonnenberg-signal I can reproduce the bug consistently using @thornjad's steps.

Can you reproduce it as well? Do you now have enough information?

@lehresman
Copy link

lehresman commented May 6, 2019

I can confirm that @thornjad's steps reproduce the problem for me.

Note that after step 4, it appears as if two applications have focus. Signal's text input box has a blinking cursor, but the application does not have focus. Another application has focus (and has a blinking cursor) and if I start typing, my key input goes to that application.

Edited (to add more details): I now notice that when I switch to the desktop that has Signal on it, if I switch away from that desktop while Signal has focus, then come back to that desktop -- Signal has focus again and everything works great.

BUT. If I switch to the desktop that has Signal on it, give Signal focus, then give a different application on that desktop focus, THEN switch away to a different desktop, THEN come back to the desktop with Signal on it, Signal now shows a blinking cursor (as if it thinks it has focus) but that other application is what actually has focus. It is this step right here that causes Signal to stop sending notifications. Now, Signal will not give me any notifications until I focus Signal again.

Hope this is helpful!

@julieces
Copy link

julieces commented May 7, 2019

I can also confirm that @thornjad's steps reproduce the problem for me.

When I leave the cursor blinking in the signal app on my desktop and then go to another window on the same desktop, the top bar of signal with the red, yellow, and green buttons grey out as expected, but the app still seems to think it is in focus and marks new messages as read.

@scottnonnenberg-signal
Copy link
Contributor

Yep, I was able to reproduce it with those steps as well. We'll need to file this bug on the Electron project, as it's the layer responsible for detecting focus and conveying the right events to our code.

@lehresman
Copy link

This same issue is happening on Slack now too. I suspect maybe they updated to the latest Electron which has this bug. Hopefully that will inspire a fix sooner.

@rca
Copy link

rca commented Jul 1, 2019

This is definitely a thing. I'm on Mac OS 10.14.5 Signal 1.25.3 and iPhone 7 Signal 2.40.1.3

Any messages exchanged between the active chat on Signal Desktop, whether it's an individual or group chat, will not receive notifications on my phone*. That last comment requires a little elaboration.

  • I have noticed that notifications do come into my phone, and my phone does buzz, but they almost immediately disappear, and i don't get an unread badge on the app icon.

I've missed messages from contacts because of this issue. It's not life or death, but slightly embarrassing when an entire day goes by without a response from me. 😬

@gsaslis
Copy link

gsaslis commented Jul 24, 2019

Reproduced the bug as well.

Tried downgrading to 1.23.2 but I get an error message that that particular version has expired... and I can only upgrade.. :(

@scottnonnenberg any idea if there is an earlier version that hasn't yet expired and where this isn't broken? Would be a nice workaround till electron folks can get the root issue fixed. ;)

@eppfel
Copy link
Contributor

eppfel commented Sep 4, 2019

I filed a bug report at Chromium, as it seems the issue comes from there. Sadly progress is very slow.

I propose a workaround that might even fix the issue more general:

introduce a timer to track user activity. If Signal becomes "focused" but then no other user action is performed do not consider messages as read.

That would also help in a case were I close some application, so Signal receives focus, but then I leave the machine. Signal would be "focused" although I'm not actually reading it.

In any case, seeing a notification twice is less of a problem than completely missing it.

@kfigiela
Copy link

kfigiela commented Sep 4, 2019

@eppfel This sounds as a good feature (not only a workaround)! I think Slack does this that way – when you switch to the app or switch between channels, there is 1-2 seconds delay before messages are marked as "read".

@Yoone
Copy link
Author

Yoone commented Sep 4, 2019

@eppfel That's a good idea! Even when/if the underlying bug is fixed, this would be a very welcome feature.

I started to click on "Note to Self" whenever I switch to another app just to avoid having my notifications read. Having an extra monitor, Signal is also sometimes at the foreground, but I might be scrolling on a browser on the other screen and not pay attention to it.

@pmetzger
Copy link

pmetzger commented Sep 6, 2019

This is happening to me as well. I'll often see a notification pop up on my phone and then the notification vanishes instantly, and no notification ever appears on the desktop.

This is under MacOS 10.14.6, Signal v1.26.2. Signal just updated to 1.27.2 while I was starting this bug report, I've not yet had a chance to see the problem here. This is an exceptionally annoying problem and makes using Signal unpleasant; it causes me to miss many messages.

@arekm
Copy link

arekm commented Sep 12, 2019

1.27.2 also has this problem. Missing notifications and the other side of conversation sees messages as read.

With disappearing messages this is "fun".

@Will-Low
Copy link

Will-Low commented Sep 19, 2019

Summarizing the above. This appears to be an issue in Chromium, which is being passed down to Electron and thus us.

For reference:
Electron bug: electron/electron#18212
Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=992319 (please star this issue to upvote)

@pjv
Copy link

pjv commented Sep 19, 2019

If this really needs to be fixed first in chromium and then make its way into electron and then finally into signal desktop, it's going to take a while.

A work-around for this honestly pretty critical issue seems important. @eppfel proposed a good one: an activity timer.

I'm calling this issue "critical" because many people are totally dependent on seeing notifications for signal messages in order to take time-critical actions. When they don't receive notifications that a message has been posted to them, it's exactly like the message never came. Signal's primary job is to reliably communicate messages from one person to another. This bug is stopping that critical functionality for many messages for many people.

@pmetzger
Copy link

I'm calling this issue "critical" because many people are totally dependent on seeing notifications for signal messages in order to take time-critical actions. When they don't receive notifications that a message has been posted to them, it's exactly like the message never came. Signal's primary job is to reliably communicate messages from one person to another. This bug is stopping that critical functionality for many messages for many people.

Normally I wouldn't just quote-and-agree with someone else's message, but this really does summarize the problem for many of us. If you're expecting that someone can reach you in an emergency and you never even see the alert until hours or even a day later, that's a very bad problem.

@Yoone
Copy link
Author

Yoone commented Sep 20, 2019

@scottnonnenberg-signal I agree with what's been said above, there should absolutely be a Signal fix without having to wait around for Chromium to get fixed in order to then wait on Electron to update their dependency.

We should have an activity timer like mentioned by a few people above. Because of that, the Upstream Change Needed label doesn't fully apply to this issue. I'm mentioning this because I'm guessing it doesn't help with prioritizing it.
On top of that, I don't think the Needs Information label is accurate at all anymore. You have been able to reproduce the bug and it's now been clearly identified since we know exactly what it comes from (I encourage you to watch the video in the Chromium bug report, that showcases it even better).

@pjv
Copy link

pjv commented Sep 20, 2019

3 signal messages this morning whose notification got eaten by signal desktop on my mac.

I just quit and restarted desktop for the first of what will be several times today in order to half-assedly, haphazardly work around this issue.

@gmalmquist
Copy link

Switching to Telegram has been a pretty good workaround for me so far :P

@pjv
Copy link

pjv commented Sep 20, 2019

Switching to Telegram has been a pretty good workaround for me so far :P

Ya, unfortunately, besides reliably communicating messages from one person to another, signal's other primary job is to do that without leaking or otherwise making that data available beyond the people in the conversation. I'm trusting signal over telegram there.

@Will-Low
Copy link

Does it look like this feature would address the issue? #2706

@pjv
Copy link

pjv commented Sep 20, 2019

Does it look like this feature would address the issue? #2706

whether it would help or not is an empirical question, but that feature request is almost in the opposite direction of this bug which is focusing the text area too much, rather than not enough.

based on the bug description in chromium, my guess is that implementing that feature request would not have any effect on this issue, but again it would have to be tested in practice.

@pjv
Copy link

pjv commented Sep 26, 2019

V. 1.27.3 that just landed has what sounds like it is a potential fix for this. Fingers crossed.

@noambonnie
Copy link

noambonnie commented Sep 26, 2019

V. 1.27.3 that just landed has what sounds like it is a potential fix for this. Fingers crossed.

I hope to hear reports from people here. My wife - who's my main Signal usage - has given up on it because of the notifications. So I can't test it in real-life scenarios.

@pmetzger
Copy link

@pjv Reference for the change to 1.27.3? I can't find it.

@noambonnie
Copy link

@pmetzger
"Fixes a macOS issue where switching desktops could cause messages to be marked read when Signal Desktop was not in focus"

@pjv
Copy link

pjv commented Sep 26, 2019

...and here's the commit: 8ccb893

@pjv
Copy link

pjv commented Sep 26, 2019

...also, so far so good in practice, though it's only been half a day.

@jeremywohl
Copy link

Hugely better. Thanks @scottnonnenberg.

Only issue I have is cmd-/alt-tabbing over to Signal, with an open chat, doesn't mark read anymore. Nor can I figure out innocuous, non-input keypresses to mark read, e.g. return or escape key.

@scottnonnenberg-signal
Copy link
Contributor

@jeremywohl Yep, the whole point is that we can no longer rely on getting that focus notification to mark things read.

Any mouse move in the window works. And for me, spacebar works pretty well too.

@jeremywohl
Copy link

Yeah... those are not great options. First is non-keyboard, and second starts a false typing... indicator on the recipient's side.

If we could press a non-input key (e.g. return or esc), that would suffice for now, until that upstream bug is fixed.

@nestukh
Copy link

nestukh commented Oct 4, 2020

I'm having this bug on signal-desktop on GNU/Linux (Debian Stable, Buster): if someone send me a message, the message is marked as read even if I'm away from keyboard and from phone (Android).

Signal: v1.36.3
OS version: Debian 4.19.146-1 (2020-09-17) x86_64
Chromium: Ungoogled Chromium 84.0.4147.135

Should I open a new issue?

@scottnonnenberg-signal
Copy link
Contributor

@nestukh Yes, please enter a new bug and fill out the full bug template. We especially need your debug logs. Another key thing to include will be your window manager.

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

No branches or pull requests