Self-inconsistent message ordering between element-ios and element-web #1913
Labels
A-Timeline
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Major
Severely degrades major functionality or product features, with no satisfactory workaround
T-Defect
Steps to reproduce
When messages are sent from
element-ios
to another user usingelement-web
, messages appear out of order.The key thing is that even messages from the same user appear out of order, e.g. user U1 sends messages
M1, M2
to user U2, and those messages are shown in orderM2, M1
in U2's UI.Thus I call it "self-inconsistent" message ordering: This issue is not about a message from U1 racing against a message from U2 (in which actual races are possible). When U1 sends
M1, M2
, then the order should be exactly as written.In fact, the message interleaving delay can be so large that conversations become very nonsensical. Here is a concrete example with screenshots I recorded today. My friend U2 chats with me (U1,
@nh2
). Both use matrix.org as homeserver.What my friend U1 wrote and sent on iOS:
I (U2) receive only:
I (U2) reply:
and a minute later I (U2) receive:
Screenshot from U1's perspective (black background on element-ios):
Screenshot from U2's perspective (white background on element-web):
As you can see, from my perspective (white background), the conversation is nonsensical:
I get a message "Don't want to be involved in any of it" without knowing what "it" refers to.
Outcome
What did you expect?
That when a user sends me messages
M1, M2
, I do not get presented onlyM2
, which destroys temporal order of what the user sent to me, and thus makes me misunderstand the messages.What happened instead?
I suspect that something (not sure if it's the Matrix protocol, or either of the clients) tries to send messages in full isolation.
For example, when the network is spotty, or a switch from cellular network to WiFi occurs, perhaps element-ios fails to send
M1
, schedules a timer to retry that, and meanwile the user types and sendsM2
; then the timer forM1
triggers a minute later and it gets delivered out of order.I guess that a message delivery platform should first always check if there are unsent messages in the out-queue and try to re-send those, e.g. when the user sends
M2
, Element/Matrix should check whether there are unsent messages ahead of it, and send those first, or at least together in one batch with the current newer message.Operating system
iOS, and Element Web from NixOS Linux 22.05
Browser information
The iOS app, and Firefox 106
URL for webapp
app.element.io
Application version
element-ios 1.9.9 (20221018161714), Matrix SDK 0.24.1, OLM 3.2.12
Homeserver
matrix.org
Will you send logs?
No
The text was updated successfully, but these errors were encountered: