element-hq / element-hq/element-android

App continues to operate even if the crypto store is in a fatal state

Open
#8,785 1 comment 0 reactions 0 assignees View on GitHub
A-E2EE
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

In some cases, sessions cannot access the crypto store anymore: see rageshakes https://github.com/matrix-org/element-android-rageshakes/issues/61406

These errors look like:
```
2024-03-09T15:31:36*411GMT+00:00Z org.matrix.rustcomponents.sdk.crypto.CryptoStoreException$CryptoStore: Error encrypting or decrypting a value aead::Error
....
at org.matrix.rustcomponents.sdk.crypto.OlmMachine.outgoingRequests(matrix_sdk_crypto_ffi.kt:52)

```

The app is still running, but this will produce unable to decrypt messages: the message is encrypted but outgoing request cant be executed and then the message is sent.

```

2024-03-09T15:31:36*414GMT+00:00Z 40782 E/ /SYNC/SyncThread: org.matrix.rustcomponents.sdk.crypto.CryptoStoreException$CryptoStore: Error encrypting or decrypting a value aead::Error
at org.matrix.rustcomponents.sdk.crypto.FfiConverterTypeCryptoStoreError.read(matrix_sdk_crypto_ffi.kt:8)
...
at org.matrix.rustcomponents.sdk.crypto.OlmMachine.outgoingRequests(matrix_sdk_crypto_ffi.kt:52)
at org.matrix.android.sdk.internal.crypto.OlmMachine$outgoingRequests$2.invokeSuspend(OlmMachine.kt:14)

2024-03-09T15:31:36*923GMT+00:00Z 40781 D/ /Tag: Event sent to !uggHotIGjUwwvkmNJw:matrix.org with event id $vNRtHOGTtiKfUALiFPi9b-v_5QiCmBugYWDaDUzwYSM
```
This is surprising.
This send operation should have fail. The app can't work if the crypto database can't be accessed, it's a fatal error that should stop the app and prompt something to the user.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.