Signal-ios: Messages are not always in order when using Signal Desktop

Created on 15 Oct 2016  路  5Comments  路  Source: signalapp/Signal-iOS

  • [x] I have searched open and closed issues for duplicates

Bug description

When Signal iOS receive some messages exchanged via Signal Desktop while Signal iOS was offline, they are not in order.

Steps to reproduce

  • Get Signal iOS and Signal Desktop synchronised
  • Disconnect the network on the iPhone
  • Exchange some messages with another person via Signal Desktop
  • Connect the network again on the iPhone to synchronise Signal iOS

Actual result: All your messages are printed first in the conversation, then the other part鈥檚 ones.

Expected result: Your message and other part鈥檚 ones follows like in Signa Desktop.

Screenshots

On Signal Desktop:

capture d ecran 2016-10-15 a 19 10 35

On Signal iOS:
signal

Device info

Device: iPhone 5C
iOS version: 9.3.5
Signal version: 2.6.0

All 5 comments

I believe the underlying error is that we're sorting by timestamp that the message was created on the users device. So, when the participants clocks aren't in sync we get this misordering.

A better solution would be to order messages by when we received them.

edit: the reverse is true! we are sorting by when they are received. Which, in the case of receiving sync messages sent from desktop, could be completely irrespective of the order the conversation occurred.

I鈥檝e just checked, and the 3 devices used (my iPhone, my Mac and other part鈥檚 iPhone) have the same time with a maximum of 1 second in difference. I鈥檝e done another test, waiting 30 seconds between each message and the problem remains the same.

Able to reproduce 100%. Messages sent from to myself from desktop appear at the top of all messages on iOS rather than interleaved in message order.

Interestingly, the iOS client still shows accurate timestamps for each of the messages. This causes a sequence of non-chronological timestamps in between the message bubbles (i.e. my messages would be sent at 21:00 and 22:15, and replies came in at 21:30 and 23:00, and would be timestamped as such, but still ordered [mine][mine][theirs][theirs]).

This can be observed by keeping the iOS device offline over the span of a low-throughput conversation that lasts over a longer period of time (although I'm uncertain what the threshold is before these timestamps are inserted).

Done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andyggg picture andyggg  路  4Comments

denver-s picture denver-s  路  4Comments

mxmerz picture mxmerz  路  5Comments

zstal picture zstal  路  4Comments

loki187 picture loki187  路  3Comments