element-hq / element-web

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

Video thumbnails incorrectly report "Error decrypting video" for network errors #28060

Open richvdh opened 1 month ago

richvdh commented 1 month ago

Suppose the media repository is having a bad day, and returning 500 or 404 errors; or that the video you are looking for has been removed/was never correctly uploaded.

In that case, the following is shown in the timeline:

image

This is not a decryption error; instead it is a networking error. It should be caught and reported as such.

Related: https://github.com/element-hq/element-web/issues/27862, https://github.com/element-hq/element-web/issues/28016

richvdh commented 1 month ago

Console contains:

Unable to decrypt attachment:  DownloadError: NetworkError when attempting to fetch resource.

Other reports have the following in the logs:

2024-09-17T15:05:22.555Z W Unable to decrypt attachment:  MatrixError: [404] Not found (https://matrix-client.matrix.org/_matrix/media/v3/download/matrix.org/DAVspLKibesLGUjNopnQfTYa?allow_redirect=true)
M_NOT_FOUND: MatrixError: [404] Not found (https://matrix-client.matrix.org/_matrix/media/v3/download/matrix.org/DAVspLKibesLGUjNopnQfTYa?allow_redirect=true)
    at p (vector://vector/webapp/bundles/acaf93297a5a35ea8349/2586.js:2:446534)
    at d (vector://vector/webapp/bundles/acaf93297a5a35ea8349/2586.js:2:2737631)
    at async s.getFn (vector://vector/webapp/bundles/acaf93297a5a35ea8349/2586.js:2:2755377)
    at async ft.componentDidMount (vector://vector/webapp/bundles/acaf93297a5a35ea8349/2586.js:2:1942963)