element-hq / element-web

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

"Download attachment" incorrectly reports "Error decrypting attachment" for network errors #28016

Open richvdh opened 1 week ago

richvdh commented 1 week ago

STR:

  1. Upload a binary/text attachment (not an image/video) to an encrypted room.
  2. Suppose that the media repo is having a bad day; alternatively, block requests to <server>/_matrix/media/v3/download/ in the devtools
  3. Click on the attachment (not the "download" arrow, the attachment itself)
  4. Observe: image

Oddly, the download button works correctly (reports "Download failed").

Likely related to https://github.com/element-hq/element-web/issues/27862

richvdh commented 1 week ago

cc @Half-Shot who reported this in a rageshake

c33s commented 1 week ago

not sure if it fits 100% here. i have this problem also for audio, images and videos.

image

it is an encrypted chat (one on one), where i uploaded the video/image and my element is telling me i can't decrypt ist directly afterwards.

if i try to use the download button i get stuck with the loading icon and it does nothing

image

this behavior started for me on 2024-09-04 where a friend shared an mp3 file he produced. there i got the following error:

Error processing audio message

image

here an example upload from a png file smaller than 10kb

00dHtjQBgF

tioneb9 commented 1 week ago

Similar to #28017 . Backward compatibility with previous versions of Element is broken. Resolution is to upgrade to the latest version of Element, where possible. Otherwise, need to find an alternate software solution for file exchange.

turt2live commented 1 week ago

@c33s this issue is more that the error message is wrong. The behaviour you're seeing is https://github.com/element-hq/element-web/issues/28011

c33s commented 1 week ago

Resolution is to upgrade to the latest version of Element, where possible. Otherwise, need to find an alternate software solution for file exchange.

which version of element is the minimum required version to prevent this error?

tioneb9 commented 1 week ago

Don't know the minimum version. However,

a. On Linux desktops, Element desktop version 1.11.29 & 1.11.61 had the issue. An update to version 1.11.76 via the Element.io repository resolved it. b. On a Windows 7 laptop, last version of Element supported on Windows 7, version 1.11.23, has the issue. No update possible. c. On a Windows 10 desktop, Element desktop version 1.11.76 did not have the issue. d. On a Windows 11 laptop, Element desktop version 1.11.75 did not have the issue. e. On Android cell phones, Element Android app version 1.5.11, 1.5.32 & 1.6.18 had the issue. An update to version 1.6.20 via the Android App Store resolved it.

Hope this helps.