Missing and out-of-order messages in Android-App-only group chat
- [X ] I have searched open and closed issues for duplicates
- [X ] I am submitting a bug report for existing functionality that does not work as intended
- [X ] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [X ] This isn't a feature request or a discussion topic
Bug description
I experienced both missing and out-of-order messages in a group chat. Similar isses have been already reported (#7429, #3332, #4134), but everytime, the Desktop client was involved.
In this case, everybody participating used the Signal Android client currently available on Google Play (4.58.5) only. This is not the Desktop Client issue!
Some messages were not received by one participant. Additionally, some messages on the phone of the participant with the missing messages were displayed in wrong order.
Steps to reproduce
This seems to be hard to reproduce. We couldn't figure out a pattern, this seems to happen randomly. But, as long as this chat lasted, multiple messages weren't delivered to one participant and others were in wrong order. They also didn't appear later (until now, about 10 hours later).
Screenshots
Here's a side-by-side screenshot of a part of the chat. On the left side, it's my Nokia 4.2, running Android 9 (it actually only displays "9"!) with the correct order and all messages. On the right, it's my wife's Samsung Galaxy A3 2017, running Android 8.0.0. You can both see missing messages (on one reply with a cited message, there's even an "Original message not found" error displayed!) and messages in wrong order:

Device info
Device: Samsung Galaxy A3 2017 Android version: 8.0.0 Signal version: 4.58.5
It seems to be hard to catch hold of this. Anyway, if there's anything I can do to help tracking this down, let me know!
I can confirm this happening. I was just about to post the issue but I found this.
In my case, no missing messages but are out of order (not sorted correctly).
It says "original message not found" but when I scroll down, I can see the original message which wasn't sorted properly in the first place.
https://imgur.com/a/nZTRuYe
Debug log here: https://debuglogs.org/4c4781aee33c2bcc164ce04f9f636ac9510927c7a9cf549ee0cd5313c2150080
This only seems to happen if a lot of messages are being written with only a few seconds time between by multiple people. We just had a group chat with four participants, and the messages arrived totally mixed up on my wife's phone …
This only seems to happen if a lot of messages are being written with only a few seconds time between by multiple people.
This isn't an easily-solvable problem given that Signal does client-side fanout for group message sends. That means if I'm sending a message to a group with 20 people in it, I send that message 20 times. This is because the service doesn't know who is in the group -- a purposeful and important property.
If multiple people are sending messages at the same time in a larger group, that means recipients could receive messages in different orders depending on how each sender fanned-out the messages. We're thinking about how this could be improved, but it's a hard problem.
The group consisted only of 6 people, and they weren't writing at the exact same time, but with a few seconds between. The messages were always answers to the previous ones, so the time between was at least the time to write the message. The mixed up messages were probably written in the same minute, but surely not in the same second … and still, this doesn't explain the missing messages …
I don't know how the internals work, but if the wrong order is a timing problem, could this be solved by giving the message a fixed timestamp? When it's sent (for the first time), the timestamp is fixed and attached, at least exact to the second or even millisecond, so that it doesn't matter if it's sent a bit later (as it will be the same timestamp)? The reference time would be of course the server time, the server transmits it to the client periodically, the client calculates it's deviation of it's local time from that so that the attached timestamp can be generated to exactly match the server time? Even if the messages are delivered in a wrong order, the client still could sort them correctly, as the timestamp would be always correct …
I neither looked at the code, nor do I know how to code Java (only C++/Qt and some other stuff) … Just thinking aloud …
Looking at my screenshot above, I just saw that the messages aren't even sorted by the displayed time! See the first three messages: The first says 19:56, the second 19:59 and the third 19:58?!
Messages are sorted by received time, not sent time. Otherwise you could have situations where a new message comes in, but higher up in the conversation, causing you to not even know it exists. There could be a sizeable gap in between sent+received time if, for instance, the sender was taking a while to send a message.
Using any fixed timestamp that would allow messages to be inserted at an arbitrary position in the conversation (such as the scheme you proposed) has the same problems. It's a matter of balancing trade-offs.
I can just speak for myself, but messages should be really sorted by sent time, not received time. Otherwise, it's sometimes hard to follow the conversation! It's the order the messages were written in, and the user (at least I) expects … or it should be at least an option to choose.
What about displaying or adding a notification if a message arrives out of order? It's not something that happens all the time, probably only in the mentioned case here. Either, one could display some "A message that has been written earlier was received just now", which disappears and/or can be tapped away, or one could add some "system message" like "Signal: Message from xxx at yyy received" (so that's clear and also replicatable later that the message was received out of order), and one can scroll to the respective message by tapping it? And always only if it happens that a message is received too late?
By using a server-synchronized timestamp, one could prevent this to happen all the time if a user's clock is off …
Just to say this: No hard feelings! You guys do a really gread job with Signal! But for some people I know, it was (completely opaque to me!) quite some efforts at persuasion to make them even install Signal alongside with WhatsApp. And if those guys run into an issue like this … "What's up with your messenger thingy? It displays our chat in the wrong order!" – you know what I mean?! ;-)
… but what about the missing messages?!
Is there any chance that at least an option for displaying messages in a group chat in the right order (according to the displayed time) could be added, if the root cause can't or won't be fixed?
Today, we had a group chat with only four participants but a rather high message frequency. On my wife's phone (for whatever reason), the messages were displayed completely mixed up. Some messages are even displayed with the times mixed up, e. g. "22:12" after "22:13" and so on … This renders such a chat really unreadable and almost unusable. In this case, it's not clear anymore which message was the answer/next one and which message refers to which one.
Is there anything I can do to debug this or help about this? Or to track down why e. g. it doesn't happen on my mobile but on my wife's?
I don't know if this fits here or if I should make a separate issue, but I had a missing message today in a Group. The Desktop App and the Android App were both online.
This is the conversation on the Desktop App, where no message was missing:
It's 3 pictures, a text message from me and then a text message from another member referencing the third picture.
This is how it looks on the Android App:
As you can see the third picture is missing.
The picture 3 has the following ID and time on the Desktop App:

Debug Logs from the Desktop App (Linux, Signal Desktop v1.38.2): https://debuglogs.org/05d99d45047252de1954c51e490b7cd27f1807e9381ca09eed41d48e65890130
Debug Logs from Android (Android 10, Signal 4.78.5): https://debuglogs.org/1079f2eb77233e6d7cee4e222eb7770332439f61f41257825f4400591368a6f0
@Nisc3d Thank you for the logs, they were very helpful. I think I figured out what happened in your case, and there's a fix in the next release :+1:
I'm glad to hear that, thank you very much for working on it.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
I didn't see this for quite some time, maybe the new style groups solved this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.