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

Error message "Unable to decrypt. MatrixSDKCrypto.DecryptionError" appears randomly in a chat with a single user #7591

Open
garret opened this issue Jun 12, 2023 · 17 comments
Labels
A-E2EE O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience 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

@garret
Copy link

garret commented Jun 12, 2023

Steps to reproduce

I self-host a dendrite instance (via docker, federation disabled) on a Raspberry Pi 4 (4GB) where there are at the moment only 2 users in total. One user uses element on iOS and randomly gets an error message where it has been impossible to establish the steps to reproduce how to get that error. The error appears randomly when the chat window with the other user is opened or when a message is being typed. It is also difficult to foresee how often the error will happen. Sometimes it can be twice a day, while other times it could be once a week.

The other user – which uses element on an Android device – has never experienced the error described in this issue.

Outcome

The user using element on iOS expects to write a message but it is instead sometimes and randomly presented with the error as in the following screenshot:

ima_f2bd398

** Unable to decrypt: Handlingen kunne ikke udføres. 
(MatrixSDKCrypto.DecryptionError fejl 2.) **

Element iOS interface is set in English but the iOS system language is Danish.
Handlingen kunne ikke udføres could be translated as The operation couldn't be performed.
Fejl in Danish is Error.

Additional information taken from the Element iOS settings that might help:

Matrix SDK 0.26.10
Rust Crypto SDK 0.6.0 (Vodozemac 0.3.0)

Your phone model

iPhone 8

Operating system version

iOS 16.5

Application version

Element 1.10.12 (20230516163937)

Homeserver

Dendrite 0.12.0+74dc546

Will you send logs?

No

@garret garret added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Jun 12, 2023
@garret garret changed the title Error message "Unable to decrypt. MatrixSDKCrypto.DecryptionError" appears randomly in a chat with single user Error message "Unable to decrypt. MatrixSDKCrypto.DecryptionError" appears randomly in a chat with a single user Jun 12, 2023
@Velin92 Velin92 added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely A-Timeline labels Jun 13, 2023
@jacotec
Copy link

jacotec commented Jun 14, 2023

Was about to create that same issue. Happens to all IOS users and nearly daily, happens never on any other platforms. Annoyance factor is very high.

Addional investigation comments:

  • It happens also with Synapse
  • It even more likely happens if the user has more than one devices, sends a message on device A and device B shows this error (although the message was successfully sent on device A - no need for any resend)
  • It's not limited to encrypted rooms only! Can happen in unencrypted rooms as well, in this case the message is shown "greyish" (like a message which was not sent yet) instead of the mentioned encryption error above. But you'll find the message successfully sent in your chat further above.
  • "Retry" never works! You need to tap the waste icon to delete it. In 10% of the cases even this does not work and you need to clear the cache to get rid of this error in the chat.
  • Uncertainity is high for the users as they always think one of their messages did not make it to the server. In encrypted rooms they can't even double check as they simply see the "Fail 2 Error" instead of the message content.

@Velin92 In my user base it's not occasional - it happens nearly daily to all users with the IOS app. I even listed it in my "Troubleshooting FAQ"

@Velin92 Velin92 added O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience and removed O-Occasional Affects or can be seen by some users regularly or most users rarely labels Jun 14, 2023
@discoltk
Copy link

The IOS app is unusable. Unclear on why this is labelled 'minor', there should be no higher item than this.

I thought perhaps the user I was having issues with was at fault in some way, but yesterday I removed our chat in person and started a new room and manually got both of their IOS devices cross verified (difficult due to how buggy the verification interface is on IOS.) Today after they shared a link, we're back to grey messages about decryption.

Steps to reproduce:

  • One user with two IOS devices / sessions
  • Second user with two devices / session (Element for Android + Element for Linux)
  • Everything cross verified in person, green on all sessions, on all devices.
  • IOS user shares a link

@jacotec
Copy link

jacotec commented Jun 16, 2023

@discoltk Using the Share Extension is definitely broken, it produces wrong message indices: #7499

That's one thing I have no understanding that this is also not major with highest priority.

I still do not understand why there is no server configuration to have the ability that DM chat rooms are clear by default and the encryption can be enabled by the participants if they want E2EE. There are still so many E2EE bugs, especially in IOS.

And creating unencrypted DM rooms is possible, but a mess for both sides as action is required (set the room to DM etc.).

@angloromanticism
Copy link

Also having this:

  1. sent text from Element iOS app, received fine by recipient's iOS app.
  2. Open MacOS Desktop app, message says "Unable to decrypt message" and I cannot view the message I sent on desktop.
  3. View source of message, shows this error:
{
  "type": "m.room.message",
  "content": {
    "msgtype": "m.bad.encrypted",
    "body": "** Unable to decrypt: DecryptionError: Duplicate message index, possible replay attack: 
  1. This seems related to Prompted to request keys from other devices, even when it won't help element-web#25108 but is not happening via the share screen, just regular message entry.
  2. intermittent– I have not figured out further variables to make it happen every time, but it has happened about a dozen times in the last two weeks. Similar errors show up on Cinny (including the share-to decryption error), which implies that it is more of an iOS bug than it is Element-Desktop bug, since only iOS produces the errors in other clients, other clients never produce the error for iOS.

@OmidH
Copy link

OmidH commented Aug 3, 2023

Bug still exists on newest element app version and latest synapse homeserver.

** Unable to decrypt: The operation couldn’t be completed. (MatrixSDKCrypto.DecryptionError error 2.) **

@leematos
Copy link

I just hit this today with a failed call in a 1:1 chat -- I recently used the share menu to share a picture in that channel, so I suspect that triggered the issue?

I'm trying to clear the cache and see if that helps. (Will know more on next call attempt)

@RealYHD
Copy link

RealYHD commented Aug 23, 2023

I'm also here to stress the significance of this issue and contribute what I know.

I am slowly attempting to move family over to Element and many of them have IOS devices. This issue has cropped up when a family member installed Element onto a new iOS device in which I do not have physical access to. This leaves me and this family member to only be able to switch to another platform to communicate in an attempt to fix the issue.

The error message is also unreasonably inutile leaving this family member effectively helpless. The obvious question is then why don't we just switch off the platform? I wholeheartedly agree with @discoltk that this issue should be considered non-minor as for non tech-literate folks, this effectively makes the Element app completely impractical in the best case scenario.

To be clear, I like Matrix protocol and it's objectives hence my efforts in having family try it out. I would personally be disheartened to switch to another platform, however, there is a threshold of practicality that must be considered.

@jacotec
Copy link

jacotec commented Aug 23, 2023

@RealYHD I pretty much think this is really related to the issues with the IOS Share Extension in Element-IOS, which has been disabled with the latest release.

Not using the share extension did not give me this error in the last weeks. Can you check any relation of the bug to the fact that some user used the (still existing in 1.10.x) share extension in IOS?

@RealYHD
Copy link

RealYHD commented Aug 23, 2023

@RealYHD I pretty much think this is really related to the issues with the IOS Share Extension in Element-IOS, which has been disabled with the latest release.

Not using the share extension did not give me this error in the last weeks. Can you check any relation of the bug to the fact that some user used the (still existing in 1.10.x) share extension in IOS?

@jacotec I appreciate your quick response and potential explanation. I don't think they used the share function of the app at all if that is what you're referring to. It seems to have happened when they added a new device today. This should mean the new device is on the latest version as well. It could be a matter of them not verifying the new device as well however, if this is the case, I would point to the error message needing improvement.

This being said, I will check with them. Thanks again.

@RealYHD
Copy link

RealYHD commented Aug 23, 2023

I "manually verified" their new session and they have confirmed that the error has gone away. This does not seem to have been related to IOS share extension.

If Element and Matrix is to go mainstream, I believe the team should try to disambiguate the error messages from something more technical, to something very trivial, such as verifying a device.

This is not the first time this error message has popped up, and the other time, I still don't know what caused it (may be the iOS share function) as I believe the device was verified. It could have been an old version, it could have been iOS uninstalling the app to save space and thereby causing some issue after reinstalling. I'm speculating though. Food for thought. Thanks!

@jacotec
Copy link

jacotec commented Aug 23, 2023

If Element and Matrix is to go mainstream, I believe the team should try to disambiguate the error messages from something more technical, to something very trivial, such as verifying a device.

I'd even more say: These kind of error messages may not happen at all. I doubt anyone sees this kind of errors in WhatsApp or Signal - and these are exactly what normal users are comparing to. They don't care about technical differences or all the pro points - they just want to have a flawless experience.

@Velin92 Velin92 closed this as completed Aug 23, 2023
@garret
Copy link
Author

garret commented Aug 30, 2023

Unfortunately, the same person with an iPhone I mentioned in my initial post is still experiencing the same issue (probably a bit less) after updating the app to the latest version at the moment of writing. The error seems still to appear randomly (not triggered in this case by the image sharing functionality).

ima_8eb260c

@michaelsmoody
Copy link

Can someone please chime into as why this is closed? This is a SEVERE bug. As a very long-time Element (Riot/Matrix) user, going way, way back, and in fact even a paying user of various services, even trying the Signal bridge (which was cancelled unceremoniously! I might add, without a word), etc, as a multi-platform user, who up until this point was on macOS, Windows, Linux, and Android (but iOS very limited using only an iPad which worked without this problem), this is now a completely DAILY occurrence), making Element almost unusable!

(having written a long explanation that's just not necessary, I'll simply say: I thank the developers for all of the extremely hard work, but this is making Element nearly impossible to use! And we try to use it as a PRIMARY communications channel!)

Truly, due to recently switching to iOS from Android due to a number of factors, this is nearly unusable, as missing messages, missing attachments, and other problems make it unreliable.

Please open this issue once again!

@garret @Velin92

@terion-name
Copy link

terion-name commented Dec 8, 2023

+1, this is a severe bug (not "minor" at all!) and closing this issue without fix — is irresponsible and unacceptable
@Velin92

UPD
also, ths appears not only in p2p chats, but in group chats also and for random users (one user reads message ok, other has this error)

@Velin92 Velin92 added S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed S-Minor Impairs non-critical functionality or suitable workarounds exist labels Dec 11, 2023
@Velin92 Velin92 reopened this Dec 11, 2023
@ggPeti
Copy link

ggPeti commented Mar 15, 2024

Thanks @Velin92 for rectifying this. Dismissing and dowplaying severe issues is not the way to handle them. This issue popped up today on the latest version of the iOS app.

@Velin92
Copy link
Member

Velin92 commented Mar 15, 2024

We are sorry to hear that this issue is still persisting, the thing is that the maintenance of Element is becoming secondary, to give more time to Element X development.
I suggested trying the new iOS app Element X, which is faster, more stable, and has a better overall UX, and is getting more and more features to match the ones that also Element has.

@TommyTran732
Copy link

I am running into this problem too :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience 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
Status: Triaged
Development

No branches or pull requests