element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.17k stars 1.99k forks source link

Unexplained Decryption failure due to "Unable to decrypt attachment: Mismatched SHA-256 digest" #28312

Open richvdh opened 3 days ago

richvdh commented 3 days ago

A user reported a decryption failure on a message containing an image.

The logs contain no megolm decryption failure, but they do have:

2024-10-21T09:53:11.961Z E Unable to decrypt attachment:  Mismatched SHA-256 digest
./node_modules/matrix-encrypt-attachment/lib/browser-encrypt-attachment.js/</<[1]</decryptAttachment/</<@https://develop.element.io/bundles/08f5e67c245583e16087/7530.js:41217:31
step@https://develop.element.io/bundles/08f5e67c245583e16087/7530.js:41152:23
./node_modules/matrix-encrypt-attachment/lib/browser-encrypt-attachment.js/</<[1]</__generator</verb/<@https://develop.element.io/bundles/08f5e67c245583e16087/7530.js:41133:53
fulfilled@https://develop.element.io/bundles/08f5e67c245583e16087/7530.js:41124:58

I am at a loss to explain why the digest would be a mismatch.

The logs are unhelpful; they lack key information such as: