element-hq / element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
https://element.io/labs/element-x
GNU Affero General Public License v3.0
422 stars 100 forks source link

EXI silently failed to send message due to unverified devices in a room. #3473

Open ara4n opened 3 days ago

ara4n commented 3 days ago

Steps to reproduce

  1. Send two messages in quick succession in a room where a user has added an unverified device to their account.
  2. First message local echoes (i think) but then the local echo vanishes entirely from the timeline - empirically it never gets sent.
  3. Second message gets the red warning icon, which in turn gives (as expected):

However, the first msg is lost forever.

Outcome

What did you expect?

We should never ever lose messages.

What happened instead?

Presumably there's a race when handling verification state which means that messages sent in quick succession may get lost in the face of unverified devices - or, worse, the first msg sent gets lost whatever.

Your phone model

No response

Operating system version

No response

Application version

747

Homeserver

No response

Will you send logs?

Yes

ara4n commented 3 days ago

See also https://github.com/element-hq/element-x-ios/issues/3006 for a similar failure mode (albeit unrelated to verification pinning)