matrix-rust-sdk icon indicating copy to clipboard operation
matrix-rust-sdk copied to clipboard

UTD after migration from sliding sync proxy to native sliding sync

Open maan2003 opened this issue 10 months ago • 4 comments

  • I have a client using matrix-sdk-ui which is persistent and was using sliding sync proxy.
  • I switch client to native sliding sync.
  • when this client is invited to a new room (and joins), it is not able to decrypt messages from in this new room.

I have narrowed down this bug even further both clients are using 0.10.0 matrix-sdk-ui. The only difference is the sliding_sync_version_builder.

--- a/matrix.rs
+++ b/matrix.rs
@@
     ) -> Result<Client> {
         let builder = Client::builder()
-            .sliding_sync_version_builder(matrix_sdk::sliding_sync::VersionBuilder::Proxy {
-                url: url::Url::parse(&sliding_sync_proxy)?,
-            })
+            .sliding_sync_version_builder(matrix_sdk::sliding_sync::VersionBuilder::Native)
             .homeserver_url(home_server)
             .with_encryption_settings(matrix_sdk::encryption::EncryptionSettings {

I am able to reproduce this behavior in tests (but code is not open source).

  • UTD only happens on migrating clients, not on fresh client using native sliding sync

maan2003 avatar Feb 14 '25 13:02 maan2003

This is expected, as the proxy will "steal" the to-device events containing the room keys from the client.

poljar avatar Feb 14 '25 13:02 poljar

oh, is there a solution? we can't turn off the proxy because old clients will stop working. Is there a way to deregister from the proxy?

maan2003 avatar Feb 14 '25 13:02 maan2003

bump. @poljar do you know if is there some server side endpoint on synapse that we can use to deregister from the sliding sync proxy?

otech47 avatar Mar 20 '25 11:03 otech47

@maan2003 I think a sane choice is for the user to log off and on, so that a new device is created, and the keys will sync again.

@otech47 Synapse has no endpoint to talk to the proxy. It has no idea a proxy is sitting in front of it.

Hywan avatar Mar 21 '25 08:03 Hywan