element-hq / element-call

Group calls powered by Matrix
https://call.element.io
GNU Affero General Public License v3.0
555 stars 88 forks source link

Event decryption failures are not retried #2560

Open hughns opened 1 month ago

hughns commented 1 month ago

If the is a failure decrypting a Matrix event then it is never retried.

You get errors like this:

Error decrypting event (id=$QMs1sFyzn8640OSYLsahHo9ScNN54CM1Qs2tQcYhTjg type=m.room.encrypted sender=@hughns:ess-ecall-poc.ems-support.element.dev room=!ZWXChHvbxzRiDtOPzC:matrix.org ts=2024-08-12T14:32:48.121Z): DecryptionError[msg: The sender's device has not sent us the keys for this message., session: t3FJoWaZkfoPMNAQe6Ys2UjpkUMAmhgoRWgiPIpQNRI|0p/+J4i93ZBN3oqUNq6dXPjomSUU9+5UsO6DA5lhV8c]

This is problematic where the event in question is of type io.element.call.encryption_keys and leads to media decryption errors at the LiveKit layer.

A quick fix would be to do some limited retries. A better fix would be to allow a participant to request keys from other participants.

hughns commented 1 month ago

This will need a js-sdk bump once https://github.com/matrix-org/matrix-js-sdk/pull/4346 is merged.