status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 988 forks source link

Loaded messages appear for a Receiver chaotically in 1-1 chat #21460

Open mariia-skrypnyk opened 1 week ago

mariia-skrypnyk commented 1 week ago

Bug Report

Follow up of https://github.com/status-im/status-mobile/pull/21411

Problem

When we, as the receiver, expect a batch of new messages, they often appear chaotically in our chat. The last message may show up first, followed by the initial messages, and only then the ones in the middle of the conversation.

Reproduction

  1. Login to app as a Receiver (a member of Status community)
  2. Login to another device as a Sender (a member of Status community)
  3. As a Receiver do a logout and close the app.
  4. As a Sender wait till Receiver status become offline and send 20+ messages to 1-1 chat with a Receiver.
  5. As a Receiver login and open chat with a Sender.

Actual behavior

Chaotic behavior starts from the 00:05 sec

https://github.com/user-attachments/assets/20f0d3e3-38c5-439c-9645-48f7ff693519

Receiver_chaotic.zip Sender_chaotic.zip

Expected behavior

Messages appear from the eldest to the newest logically

Additional Information

ilmotta commented 1 week ago

@mariia-skrypnyk We can close this issue because there's no guarantee of message ordering, as far as I understand. The behavior is like this by design, so it's probably the same behavior in the desktop app.