-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incoming encrypted to-device messages can be lost when the application is restarted #762
Comments
Why is this required? |
Will be fixed with the introduction of ER. |
Looks like not. The sync token is save way to early (on purpose?), before the to_devices have been processed by the rust sdk.
|
Do we actually have any evidence that EAR and EIR are similarly affected? The Rust SDK makes this much harder to mess up than before, so I don't see it as a given that the other platforms have the same problem |
Given that element-hq/element-web#23113 is now closed, and we have no reports of it happening on EAR and EIR, can we close this? |
Confirm that android only saves the token after all the to_devices have been processed. For iOS I am not sure for the background sync (NSE). Looks like the crypto sync is handled after the call to So possible that the background sync of IOS is affected? |
Ok so it's also fine for IOS. So closing. |
If you restart /upgrade (web) or the app is killed in background while processing to_devices coming down the sync, the non decrypted to_devices will be dropped and lost producing UISIs.
This is problem with atomicity of
/sync
. The sync token is persisted before allto_device
s have been processed, so the next time the app launches it will use the saved token, thus ack'ing the previousto_device
chunk that was received. In such case the app should start syncing with the previous token to force a redelivery of the initialto_device
chunk (or make sure that it permanently persists the to-device messages before storing the/sync
token). Olm session internal state should also be reverted if the sync does not complete.The text was updated successfully, but these errors were encountered: