Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Some media corrupt media decryption once posted into a room #2583

Closed
boogewooge opened this issue Jul 21, 2022 · 1 comment
Closed

Some media corrupt media decryption once posted into a room #2583

boogewooge opened this issue Jul 21, 2022 · 1 comment

Comments

@boogewooge
Copy link

boogewooge commented Jul 21, 2022

Background information

  • Dendrite version or git SHA: 0.8.9
  • Monolith or Polylith?: Monolith
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: No
  • go version: 1.18.4
  • Client used (if applicable): Element-Desktop and 2 different hosted instances of Element-Web (one of them app.element.io), all 1.11

Description

  • What is the problem:

In encrypted rooms on a fresh dendrite instance, a subset of all media in a room randomly can't be decrypted when the room is viewed in Element. Switching the currently viewed room in Element to another one and back rerolls the subset of media for which this is true. So, previously undecryptable media sometimes are displayed just fine afterwards and previously decryptable media becomes undecryptable. (Element shows the Unable to decrypt Image/Video error)

After a cache clear, all media are without decryption errors, without fail. After switching rooms once, the above issue resurfaces.

At the same time, users from a synapse instance in the same room never have this issue, from any Element clients.

Original event sources always stay the same on the dendrite instance, and are identical to the ones synapse users see. The decrypted event source, on the other hand, is the same on both whenever the media event in question is decrypted fine on dendrite side, and differs whenever it isn't. So, the decrypted event source a dendrite user sees is randomly different after switching rooms.

We now had a rare couple rooms where this didn't happen.

No issues of this sort ever for any of the same dendrite users in the same rooms on nheko or fluffychat - media are displayed just fine there.

  • Who is affected: At least 4 users (100% asked) from our dendrite instance we tested this with.

  • When did this first appear: In the first room we posted media in.

Steps to reproduce

  • (Optional?) Fresh dendrite instance.
  • Create encrypted room.
  • Post (from any client) some media.
  • View room from Element Web/Desktop.

I'll gladly provide logs or any of the videos that caused this issue for us.

@boogewooge boogewooge changed the title Some portrait *.webm videos corrupt media decryption once posted into a room Some portrait videos corrupt media decryption once posted into a room Jul 21, 2022
@boogewooge boogewooge changed the title Some portrait videos corrupt media decryption once posted into a room Some videos corrupt media decryption once posted into a room Jul 21, 2022
@boogewooge boogewooge changed the title Some videos corrupt media decryption once posted into a room Some media corrupt media decryption once posted into a room Jul 21, 2022
@boogewooge
Copy link
Author

boogewooge commented Jul 21, 2022

All patterns we thought we had found (apart from it only happening on Element, which remained true) at some point were broken. Closing for now and back to testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant