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

Sending offline message breaks encryption #8245

Open
r4dh4l opened this issue Mar 15, 2023 · 14 comments
Open

Sending offline message breaks encryption #8245

r4dh4l opened this issue Mar 15, 2023 · 14 comments
Labels
A-E2EE T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue

Comments

@r4dh4l
Copy link

r4dh4l commented Mar 15, 2023

Since several months I've experienced problems that recipients couldn't decrypt my messages from time to time. After talking to some other matrix server administrators we could reproduce that this happens whenever the sending device has no online connection while sending a message. This can happen on mobile devices like smartphones, tablets and notebooks in dead zones or with weak wifi hotspot signals (in my case: "hotspot hopping" from subway station to subway station).

Steps to reproduce

  1. Go offline with a mobile device (can be element-desktop on a notebook as well).
  2. Send a message in an encrypted room.
  3. Go online with the mobile device.
  4. Recepients get Unable to decrypt message (desktop client) or Waiting for this message, this may take a while (mobile client).

Current workaround: Sender has to execute /discardsession and resend the messages. This workaround is very disturbing for non-technical users.

Ideas:

  • The client shouold not let users send messages if there is no working online connection or
  • let them send messages in the way that these messages will be send when the device goes online, meanwhile the messages are tagged as "this message will be send when your device goes online again".

Outcome

What did you expect?

I expect that messages I write offline are send properly when I go online.

What happened instead?

I see my messages are properly sended by the recipients get Unable to decrypt message (desktop client) or Waiting for this message, this may take a while (mobile client) messages instead.

Your phone model

(several)

Operating system version

(several, experienced under Android, iOS and Linux)

Application version and app store

(several, experienced under Android, iOS and Linux)

Homeserver

(happens on my own server and during federated communication)

Will you send logs?

Yes

Are you willing to provide a PR?

No

@r4dh4l r4dh4l added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Mar 15, 2023
@BillCarsonFr
Copy link
Member

Duplicate of element-hq/element-web#12851

Won't fix in existing legacy mobile SDK as fixed by rust-sdk

@kittykat kittykat added the X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue label Mar 17, 2023
@KeenMaron
Copy link

what does that mean @BillCarsonFr ? But 12851 is closed, the bug still appears?

@JokerGermany
Copy link
Contributor

JokerGermany commented Mar 17, 2023

what does that mean @BillCarsonFr ? But 12851 is closed, the bug still appears?

The Bug will be Fixed with Element R and Element X (Which are the next Element Versions)

@maxkratz
Copy link

The Bug will be Fixed with Element R and Element X (Which are the next Element Versions)

Is there any public roadmap or an ETA for when to expect a release of Element X?

@JokerGermany
Copy link
Contributor

JokerGermany commented Mar 17, 2023

I think Element R will be Released next. I don't know a Release Date.
Element R is tested at the moment.
https://youtu.be/eUPJ9zFV5IE?t=1341
grafik

I don't think Element X for Android will be released before the End of the year.
https://github.com/vector-im/element-x-android/blob/17b84e757cddca799524124789ce4c4d935c8e18/README.md#roadmap

We are aiming to have a fast and fully functional personal messaging application by the end of year 2023.

@maxkratz
Copy link

Uff. If I understand this correctly, the bug mentioned in this issue will be present in Element for at least a year ...
Thank you, for the clarification.

@bmarty
Copy link
Member

bmarty commented Mar 17, 2023

Uff. If I understand this correctly, the bug mentioned in this issue will be present in Element for at least a year ... Thank you, for the clarification.

No, ElementR should land in a few weeks on Element Android.

@bmarty bmarty added the A-E2EE label Mar 17, 2023
@maxkratz
Copy link

No, ElementR should land in a few weeks on Element Android.

And what about iOS users?

@JokerGermany
Copy link
Contributor

Element R on iOS should land even earlier.

@maxkratz
Copy link

Element R on iOS should land even earlier.

Thank you.

@KeenMaron
Copy link

But you didn't clarified if the bug is fixed in R or X? Do we have to wait till X, hoping it will be fixed completely?
"The Bug will be Fixed with Element R and Element X".

@maxkratz
Copy link

But you didn't clarified if the bug is fixed in R or X? Do we have to wait till X, hoping it will be fixed completely? "The Bug will be Fixed with Element R and Element X".

I might be wrong but this sounds to me that both new apps will use the rust-based matrix sdk. Therefore, both apps will not have this bug. (At least I hope so^^)

@jo-so
Copy link

jo-so commented Mar 17, 2023

This issue is something new. The encryption while offline worked until at least Jan 2023.

@jo-so
Copy link

jo-so commented Mar 18, 2023

I've checked older versions available in the F-Droid Archive (F-Droid, settings, package sources) and found that version 1.5.18 (from 2023-01-11) is the first bad one, while 1.5.11 (from 2022-12-08) works. My test was:

  1. open an encrypted room and send a message »online«. The receiver and read it.
  2. put the device in flight mode (WLAN + mobile connect off)
  3. send the message »offline«
  4. close the room and go to the room overview
  5. disable flight mode
  6. in 1.5.11 the receiver can read the message; in 1.5.18 the receiver is unable to decrypt the message while another device of the sender can encrypt the message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue
Projects
None yet
Development

No branches or pull requests

8 participants