Skip to content

To-device messages may be lost if /keys/query fails #24682

@richvdh

Description

@richvdh

Currently, after we have decrypted an Olm message, but before we process it, we check that our list of the sender's devices is up-to-date, and if not, wait for it to be updated. This was added in matrix-org/matrix-js-sdk@a587d7c.

The logs in https://github.com/matrix-org/element-web-rageshakes/issues/19889 show a key download taking 7.5 hours to get started. The reasons it takes so long aren't entirely clear, but the upshot is that we don't process a room key message for that long.

Even worse: Once the /keys/query request finally happens, it fails, which means that the Olm message is marked as a decryption failure, so the room-key is lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-E2EEO-UncommonMost users are unlikely to come across this or unexpected workflowS-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions