Skip to content

Failures when sharing outbound session keys are swallowed #23792

@richvdh

Description

@richvdh

Sometimes there is an error queuing the to-device messages to share a megolm session; for example:

2022-11-15T09:10:40.454Z I Created batch of to-device messages with txn id m1668503440454.99 for @Manu:matrix.org:LKJZLJSTCC,@Manu:matrix.org:PSMTLDOWQW,@Manu:matrix.org:QHXUARLSTR,@Manu:matrix.org:HCYZTMSXSO
2022-11-15T09:10:40.454Z E sendToDevice failed Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
    at Worker.<anonymous> (https://develop.element.io/bundles/a20ea4fbdbb209900525/init.js:88547:25)
2022-11-15T09:10:40.454Z E encryptAndSendToDevices promises failed Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
    at Worker.<anonymous> (https://develop.element.io/bundles/a20ea4fbdbb209900525/init.js:88547:25)
2022-11-15T09:10:40.454Z E failed to encryptAndSendToDevices Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
    at Worker.<anonymous> (https://develop.element.io/bundles/a20ea4fbdbb209900525/init.js:88547:25)
2022-11-15T09:10:40.454Z E Failed to share megolm keys for WpOHNMd4I3K9glwFfyxo2nsfr9T1ZUDvsP79v4okTsM in !xlFGXqMroSeHUQLGdq:matrix.org (slice 1/6)
2022-11-15T09:10:40.454Z E Failed to ensure outbound session in !xlFGXqMroSeHUQLGdq:matrix.org Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
    at Worker.<anonymous> (https://develop.element.io/bundles/a20ea4fbdbb209900525/init.js:88547:25)

However, these errors are just logged, rather than being fed back to the user.

Exactly why the IDBDatabase is complaining like this is something of a mystery to me (see also https://github.com/vector-im/element-web/issues/14174\), but I would argue it is better to show the user even a cryptic error than to let them send a message that nobody will be able to decrypt.

Metadata

Metadata

Assignees

Labels

A-E2EEO-OccasionalAffects or can be seen by some users regularly or most users rarelyS-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-DefectTeam: CryptoZ-UISIUnable to decrypt errors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions