Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EiOS can sometimes send unencrypted messages in encrypted rooms #5184

Closed
Twi1ightSparkle opened this issue Nov 23, 2021 · 14 comments
Closed
Assignees
Labels
A-E2EE O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@Twi1ightSparkle
Copy link

Steps to reproduce

I don't know how to trigger this in the first place. But when it happens, just go to the affected room and send a message

Outcome

What did you expect?

  • The message to be encrypted
  • The room name/icon to show

What happened instead?

The room appear to be missing some state resulting in:

  • The iOS app thinks the room is not encrypted and sends unencrypted events
  • The room icon is not displaying
  • The iOS app shows the canonical alias as the room name instead of the actual name

I did a rageshake, then cleared cache. The room is now behaving.

As this is an internal room, the linked rageshake has a screenshot and the room ID

Your phone model

iPhone 11 Pro Max

Operating system version

iOS 15.1

Application version

Internal TestFlight Build v1.6.8 #20211117180457

Homeserver

twilightsparkle.dev

Will you send logs?

Yes

@Twi1ightSparkle Twi1ightSparkle added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Nov 23, 2021
@pixlwave pixlwave added A-E2EE O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Nov 23, 2021
@JonasKress
Copy link

Does the room appear to be 'unencrypted' in the UI for you?

@Twi1ightSparkle
Copy link
Author

Does the room appear to be 'unencrypted' in the UI for you?

Yes. I attached a screenshot in my linked rageshake

@ShadowJonathan
Copy link
Contributor

I just had the same problem, noted, the room was created inbetween me creating it on desktop, and me opening the room via a notification.

Despite the room not being marked as encrypted, it did decrypt messages from it, it only did not encrypt messages back

@BillCarsonFr
Copy link
Member

I just had the same problem, noted, the room was created inbetween me creating it on desktop, and me opening the room via a notification.

Despite the room not being marked as encrypted, it did decrypt messages from it, it only did not encrypt messages back

Hello @ShadowJonathan Do you also notice other issues with the room, like missing topic? missing room name? missing admin?

@ShadowJonathan
Copy link
Contributor

These are DMs, so there's no topic or room name. However, in the rooms where this happens, i dont see any user as "admin", yes.

It also doesnt say "messages here are end-to-end encrypted".

I'll clear cache.

@ShadowJonathan
Copy link
Contributor

After a clear-cache, it correctly resolved the room for me again.

I started talking to this particular user without this device being online for a while, i think it can either be a bug in;

  • iterative offline sync (in an "extension" part doug mentioned)
  • synapse's sync excluding events
  • eios's sync in general, detecting gappy state sync

@BillCarsonFr
Copy link
Member

Fixed by matrix-org/matrix-ios-sdk#1358
Doesn't protect against the state reset, but it wouldn't revert encryption

@BillCarsonFr
Copy link
Member

@BillCarsonFr
Copy link
Member

@Anderas can you have a look at the previous RS to see if you see why m.room.encryption got reverted?

@Anderas
Copy link
Contributor

Anderas commented Jul 1, 2022

The loss of encryption was likely related to general loss of room state reported in many rageshakes. Since implementing a fix for missing / corrupted room state there have (thus far) been no new reports of missing room names or unencrypted rooms.

If reported again, the rageshakes will include some extra logs that should help with identifying the root cause.

@Anderas Anderas closed this as completed Jul 1, 2022
@lyczak
Copy link

lyczak commented Aug 20, 2022

I've encountered what I believe to be this same issue on Element iOS, version 1.8.27.
I created an E2E room on Element Desktop on Mac, version 1.11.3 and was trying to send messages in the same E2E room from Element iOS.
Element iOS reported that encryption was disabled for the room. Although encrypted messages that had been sent from Element Desktop were visible in Element iOS, any new messages sent from iOS were sent unencrypted. In room settings, the Encrypted option on Desktop was enabled while it was disabled on iOS. Attempting to enable it on iOS resulted in the app freezing with a loading symbol until the operation was canceled or the app was restarted.
This problem was fixed by clearing the cache on Element iOS.
This issue shows some similarities to Element-Web Issue #21729 which I also commented on.

@pixlwave
Copy link
Member

@lyczak Did you send a rageshake for the issue?

@lunasophia
Copy link

lunasophia commented Nov 12, 2024

This is still happening for me, and is presenting in the same way with the same resolution. Element iOS version 1.11.18. I see there's now a 1.1.19 (released 2h ago) and am updating presently; will report back if I see the issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

8 participants