Signal-android: Notifications arrive late or never

Created on 19 Jul 2018  路  19Comments  路  Source: signalapp/Signal-Android


Bug description

Me and my friend message each other on Signal and we are both having this issue. Most of the time notifications arrive late, sometimes they don't arrive at all and sometimes they even arrive on time. We are both using the latest version of Signal from Google Play.

Steps to reproduce

  • Open Signal.
  • Send a message to somebody and get them to reply.
  • Determine whether or not the notifications are arriving on time.

Actual result: Notifications are frequently late or don't arrive.
Expected result: Notifications appear as soon as a message is recieved.

Screenshots

Device info


My device
Device: Motorola Moto E 2nd Gen 4G
Android version: 7.1.2 (LineageOS 14.1, Open GApps installed)
Signal version: 4.23.4

My friend's device
Device: OnePlus 2
Android version: 6.0.1 (OxygenOS 3.6.1)
Signal version: 4.23.4

Link to debug log


https://debuglogs.org/87b10ed2138d7c1c7c0adf4cb2e4f8b686e6d5c1bce191520708a67ac51cd7b1

Edit: I have added a debug log but I am unsure if it will be of any help as I captured it after noticing I had received a message but I am unsure whether or not the notification arrived on time.

Most helpful comment

I'm seeing up to 1hour delay and battery optimizations are disabled. Regardless, Signal should warn the user if there are settings that affect it.

All 19 comments

I can confirm this for Android 8.1-to-Android 8.1 messages (three persons, all on stock ROM)

@n-o-o-b Your debug log seems to be read-protected, I get an 'Access denied' response. Might that be possible?

@duchampdev I don't know. I just captured it and copied the link into my post.

@n-o-o-b Yeah, looks like there was an issue with the upload of your log. If the problem is easy to repro and you could submit another, that'd be cool.

To get more specific though: when you talk about notifications, are you talking about the notifications, or the messages themselves? i.e. do you get messages, but then notifications come in later? Or does overall message delivery just take a long time?

If both of you have the app open, are messages sent and received in a reasonable time? Are there situations where this long delay of seeing a notification appears to happen more often?

As it's the same problem, I post my experience too:
As long as the app is open, everything is fine. If the app is closed, from time to time, messages (notifications, nevertheless I guess the messages too but couldn't prove it) arrive massively delayed (4 hours or so) or only when Signal is opened again.

Might this be related due to expired tokens for GCM? I recently read the tutorial and after a lookup in the Signal code, I found that a service extending InstanceIDListenerService isn't present but is proposed to be by Google in the docs at https://developers.google.com/cloud-messaging/android/client.

@greyson-signal It's a bit difficult to reproduce since I assume I need to capture it after I don't recieve the notification and sometimes I do get it on time. I'll try and add it on once that happens again. Is there something different I need to do when capturing the log, or could it be an issue to do with the connection interruptions I was having when trying to upload it?

To answer your questions: I'm not sure. I think it's just the notifications, but I can't prove it either way. Sometimes when I send a message to my friend, it only has one tick and takes a while to deliver, so it could be the actual message being late. I can't say because I usually don't see the message until I get the notification, by which time it obviously has arrived, unless a) I am in the app in which case I don't get a notification because I am in the app or b) I get the notification on time and then obviously the message has arrived on time.

I can't really answer your last two questions confidently because I haven't done a great deal of messaging on Signal, but my impression is that I've never had issues with messages delivering when having the app open. I don't know in which situations the long delay happens more often.

My friend reports that when he gets the notifications late, he sees the correct timestamp on the messages in the app, so he suspects that it is just the notification. Of course, there may be the possibility that the messages are arriving late but displaying the correct timestamp.

I also receive messages hours later than the notification says it was received.

When the application is open, I don't have any problems.

I've been observing the same behavior. Messages often arrive delayed (only once Signal is opened).

Here are the debug logs from one such incident:

Sending device, Signal Desktop v1.16.0
Sibling device of Sending device, Signal 4.25.10 on Android 6
Receiving device, Signal 4.25.10 on Android 8.1

Sending the message from Signal Desktop:

INFO  2018-09-11T09:24:33.236Z Sending message to conversation +[REDACTED]219 with timestamp 1536657873236

Delivery receipt shows up a bit later in Signal Desktop. At the time when Signal was opened on the receiving device:

INFO  2018-09-11T09:47:34.706Z delivery receipt from +[REDACTED]219.1 1536657873236

That's also when the message arrived according to the logs of the receiving device (UTC+0200):

09-11 11:47:33.042 31350 31377 I MessageRetrievalService: Retrieved envelope! +*********75

I talked to the friend that owns the receiving device (see previous message). He noticed the delay first for a message sent on 2018-09-07 and since pretty much all messages only arrive once he opens Signal. This is also shortly after he got a new device with Android 8.1 (stock rom).

I also receive messages hours later than the notification says it was received.

This isn't what I see on my friends device. There the received timestamps show the time when he opened Signal and a message is received.

Currently many of my friends do not receive any signal notifications until the app is opened, but notifications are enabled in the settings.
On my Samsung Galaxy S4 everything works fine, but e.g. on a friend's Huawei ALE-L21 notifications are not working. See the logs of the Huawei phone:
https://debuglogs.org/366ca3e732467345805cd3f45b9d30b39a0c2454c5ea87f48215e75a6e0d5abe

Signal Version: 4.29.7

@klues Unforutnately that log is quite short for some reason (covering only the last minute). Maybe the Signal cache was cleared recently? Regardless, I don't really have anything to go off of :/

I can say that for notification delay issues, what I'm looking for are GcmBroadcastReceiver logs. Those indicate when we get a push notification event from the system itself. If I see that we get that event, but don't show notifications in a timely manner, then that's a bug we have to fix.

However, unfortunately there are phones out there that will delay giving us the push notification events in an attempt to batch them together. Also, if apps are ever "force stopped", the system will heavily delay sending push notifications as well. And unfortunately some phones will "force stop" apps when you swipe-to-dismiss them in the app switcher, which they're not supposed to do. Huawei was actually one of the manufacturers that would do this, but I believe they've stopped recently -- but maybe this is one of the phones that does it.

Either way, I could confirm if I got another log that's hopefully longer?

Thanks!

I'm pretty convinced this is not a bug with Signal's software but some thing frustratingly wrong with the manufacturer's GCM push notifications, like everyone has said. (It's also talked about in this article).

Is there anyway Signal can lobby Samsung (and other phone makers) to fix this problem? Or Whatsapp, which seems to be also effected? I'm very confused about where to go next.

Details of my experience:

A week after I got this device I started receiving messages 6-24 hours late, even when opening the app regularly. I followed all of the "turn of battery optimization" instructions Signal provided but I STILL receive messages late (although less late -- only 2-20 minutes).

I'm also get two notification for pretty much every message: https://github.com/signalapp/Signal-Android/issues/8321#issuecomment-450248355

Device: Samsung Galaxy S7 SM-G930FD
Android version: 8.0.0
Signal version: 4.31.6

I'm pretty convinced this is not a bug with Signal's software but some thing frustratingly wrong with the manufacturer's GCM push notifications, like everyone has said. (It's also talked about in this article).

Is there anyway Signal can lobby Samsung (and other phone makers) to fix this problem? Or Whatsapp, which seems to be also effected? I'm very confused about where to go next.

You say this, but I don't get this problem with WhatsApp. I unfortunately haven't had the chance to test out other FOSS messengers, like Wire, but I only get the problem with Signal.

I had a delayed message and to me it seems that receiving a second message triggered the notification.
The message that was delayed had a send timestamp of 19:53:27. I did not get a notification of that message until receiving a second message at 20:11. If I check the attached log I do notice a "Early receipt" from that contact (*52) at 19:53. Don't know the meaning of an early receipt is though.
At 20:11 a second message is received from contact *
64. This seems to throw a DuplicateMessageException. However it did raise a notification and I got both messages.
https://debuglogs.org/0e62ca4af00ed9d8f8a13389fb56d010ff56bf14bbf3ec87f8de786ba740dc30

Today I tested again with my friend's Huawei ALE-L21. He does not have the problem with WhatsApp, but with Signal.

I've sent a message to him at about 11:15 AM and an hour later he didn't have any notification. After opening the Signal App the new message popped up after some seconds.
Here is the log:
https://debuglogs.org/e433311eee32285ef274f3dac6c7199bbc0b5bc83d3a22e32e9d41f5ce40d3ed

edit: there is a gap in the logs between 2018-12-30 10:18:11.681 and 2018-12-30 12:17:43.016 so it seems that between 10:18 AM and 12:17 PM (where the Signal App was opened manually) there wasn't any activity to check for new messages/received push notification.

This is almost certainly related to battery optimizations on the user's device, or some other OS-level optimization to batch notifications together. Our support page may help: https://support.signal.org/hc/en-us/articles/360007318711-Troubleshooting-Notifications

I'm seeing up to 1hour delay and battery optimizations are disabled. Regardless, Signal should warn the user if there are settings that affect it.

I am also having this problem. All Android battery optimizations disabled and allowed to run in background as well. Only Signal behaves this way.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

j3fffff picture j3fffff  路  3Comments

jult picture jult  路  3Comments

McLoo picture McLoo  路  3Comments

kwlg picture kwlg  路  3Comments

FeuRenard picture FeuRenard  路  3Comments