Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

[2.6.4] No notifications shown on new message receive

Open nRaecheR opened this issue 11 years ago • 70 comments

After updating to version 2.6.4 from 2.5.x via Google Play Store no notifications about new received messages were shown when application runs in the background. The notifications and the messages are only received when running the the foregound, which leads to missed messages.

This is new with 2.6.4, I never had the problem with any previous version.

Samsung GT-i9505 (jfltexx) Android 4.4.4 (KOT49H.I9505XXUGNK4) OS Host: SWDD6301 TextSecure 2.6.4

nRaecheR avatar Mar 16 '15 12:03 nRaecheR

unable to reproduce on my Nexus 5 running stock Android Lollipop and TS 2.6.4, could be KitKat specific? anyone else with a KitKat device able to reproduce this? @nRaecheR does this happen with both SMS and push messages?

steps I took to test:

  1. unlock TextSecure
  2. open recent activities view
  3. force close (swipe) TextSecure
  4. have @mcginty send me test push and SMS messages
  5. phone vibrates and LED blinks for each message, also notifications exist for each.

rhodey avatar Mar 16 '15 21:03 rhodey

Mh, it seems that it works most of the time but sometimes the notifications are missing. I think it happened when switching from Wifi internet to mobile/VPN access to the same network but I'm not sure.

Tested only with push messages, I don't use SMS anymore.

nRaecheR avatar Mar 17 '15 06:03 nRaecheR

I've been having the same issue. Sent a secure message to my friend last night a 1.31am, he replied at 1.49am (from his iPhone) and I only received the message once I opened TextSecure this morning.

This issue has been happening several times over the past few days with other contacts as well. The last few times I missed notifications I was in a club (so my guess is spotty reception) and I would only receive the message (as in incoming message beep) once I forgrounded the app the next day. This time, however, it happened at home.

I really hope this issue will be fixed very soon. Not being able to receive notifications at times is a death sentence for this app as it makes it impossible for me to convince my friends to switch over.

Thanks!

https://gist.github.com/anonymous/e370c390350063a9169a

crash2kx avatar Mar 17 '15 10:03 crash2kx

I don't think its a problem with notifications, looks more like a GCM issue...

agrajaghh avatar Mar 17 '15 10:03 agrajaghh

Yes, it doesn't look like the messages are received but the notification is skipped but rather that the messages are never received at all until the app is opened manually. Interestingly, last time I had this issue on Sunday once I opened the app I received several messages from the same contact at once that he had sent the night before. So it's not message specific. Hope this helps.

crash2kx avatar Mar 17 '15 10:03 crash2kx

Is it never working or just sometimes not?

agrajaghh avatar Mar 17 '15 11:03 agrajaghh

Just sometimes not. Most of the time it works perfectly.

crash2kx avatar Mar 17 '15 11:03 crash2kx

It just happened again. I didn't receive two messages until I opened the application and once I did that two messages from 48 minutes ago came in.

https://gist.github.com/a4d2be5ac699d378f20c

crash2kx avatar Mar 17 '15 15:03 crash2kx

If this is happening, it means GCM push messages aren't making it to your device. The most common reasons for this are:

  1. You've disabled "background data" for TextSecure or for Google Play Services in Android's system settings.
  2. You've used a tool like Titanium Backup with TextSecure.
  3. You're running a custom ROM with a bad gapps install.
  4. You have a firewall (or VPN) that is blocking GCM connections.

moxie0 avatar Mar 17 '15 16:03 moxie0

Thanks for the reply! This is weird, because I am running pure stock Android without any modifications (except root), no Greenify or other mods that could deactivate background data. All other apps (Twitter, WhatsApp, Gmail) push things just fine. Plus, TextSecure works fine most of the time anyway.

crash2kx avatar Mar 17 '15 16:03 crash2kx

So GCM is not reliable message transport and is generally becoming less reliable.

The fix that OWS put in place is check via websocket for any messages that are on disk when a GCM message is received or when you open the app.

You will experience this as having an unread message that appears when you open the app that no notification appears for.

I see this behavior in twitter, fb messenger and other messaging apps because it seems like most dev teams are mitigating GCM reliability issues in the same way.

On Tue, Mar 17, 2015 at 9:12 AM crash2kx [email protected] wrote:

Thanks for the reply! This is weird, because I am running pure stock Android without any modifications (except root), no Greenify or other mods that could deactivate background data. All other apps (Twitter, WhatsApp, Gmail) push things just fine. Plus, TextSecure works fine most of the time anyway.

— Reply to this email directly or view it on GitHub https://github.com/WhisperSystems/TextSecure/issues/2703#issuecomment-82438386 .

zmanian avatar Mar 17 '15 16:03 zmanian

@crash2kx Does this happen more often on one network rather than another? Do you have a VPN or anything like that configured?

moxie0 avatar Mar 17 '15 16:03 moxie0

I'm on my home WiFi right now, no VPN configured. But it also happened to me while I was outside on my network's 3G this weekend. It usually works, both on WiFi and 3G. I remember receiving WhatsApp messages just fine during the same time frame while the TextSecure messages were missing.

crash2kx avatar Mar 17 '15 16:03 crash2kx

Just want to chime in that this is occasionally (i.e. on and off for a few days now) happeneing to me and my friend as well. I'm on CM 12 running the recent beta, she is on xperia stock 4.4 running the most recent non-beta version.

I haven't tracked whether it happened to me when on wifi or cell network. I'll keep an eye out.

Hnasar avatar Mar 17 '15 17:03 Hnasar

It's also entirely possible that this is a client bug. What we'd need to figure it out is a debug log that covers the missed notification. Steps would be:

  1. Before you open the app, you somehow notice that you're missing notifications.
  2. Without yet opening the app, have someone send you a message.
  3. Wait and see if a notification appears.
  4. If you're not notified, open the app (the message should then appear) and immediately capture a debug log.

The key is that all this happens before you open the app.

moxie0 avatar Mar 17 '15 17:03 moxie0

My second debug log I posted here https://gist.github.com/a4d2be5ac699d378f20c was captured right after I opened the app and received the missed messages (which had been sent 48 minutes before). I hadn't even opened the message yet. Perhaps something can be found in there. It is difficult to replicate the problem as receiving messages works most of the time, but I will try and do it in case I know the bug is happening. Once a message does not get delivered all following messages from that contact don't get delivered either until the app is opened. I don't know if a message from another contact after the bug has occured will trigger a notification, however.

crash2kx avatar Mar 17 '15 17:03 crash2kx

@crash2kx Yep, unfortunately in that scenario we need the debug log from 48 minutes earlier. I realize that it's difficult to reproduce, since it requires realizing that you're missing notifications before you open the app.

moxie0 avatar Mar 17 '15 18:03 moxie0

As luck would have it, I asked my friend to send me a test message and it arrived without a hitch. I'll stay on it. Kinda weird to be hoping for a message not to get through to be able to capture a debug log :D

crash2kx avatar Mar 17 '15 18:03 crash2kx

I had somehow a similar issue but was not sure if it was associated with the VPN or not, the VPN is Bitmask's demo so it should not block GCM but is a bit slow, in my case with two Nexus 5 running Lolipop on the same network one received the group messages and the other didn't unless either fully rebooting the device or manually opening the app... i was actually waiting not to open an issue until i find out if it is associated with the VPN or not.

TheStash avatar Mar 17 '15 19:03 TheStash

Just to confirm, I've been getting the same on my OnePlus One with the default/current Cyanogen 11.0 (4.4.4). There's no VPN running when it happens, but I haven't noticed whether it happens more on Wi-Fi than off.

AndrewTheLott avatar Mar 18 '15 21:03 AndrewTheLott