Skip to content
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

No spinner while catching up on to-device msgs #1269

Open
ara4n opened this issue Jul 6, 2023 · 6 comments
Open

No spinner while catching up on to-device msgs #1269

ara4n opened this issue Jul 6, 2023 · 6 comments
Labels
A-E2EE Encryption O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Design X-Needs-Product X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue

Comments

@ara4n
Copy link
Member

ara4n commented Jul 6, 2023

Steps to reproduce

  1. Launch app for first time in a few weeks
  2. UISIs, UISIs, everywhere
  3. Over the next minute or so, they slowly decrypt.
  4. No spinner at all to let you know that the app is working through a massive todevice encryption backlog.

Outcome

What did you expect?

Some kind of spinner, if we're still frantically syncing data which is needed to decrypt history. This probably shouldn't be the main sync spinner, though, given the app is otherwise usable (at least for reading msgs). Could perhaps do spinner per UISI msg? "Getting keys " or something?

Alternatively, should SS perhaps just have a flag in its responses to let the client know when it's churned through the backlog, so we know when to display an actual UTD rather than "Getting keys"?

What happened instead?

No spinner, much flakiness, much sad.

Your phone model

No response

Operating system version

No response

Application version

276

Homeserver

No response

Will you send logs?

Yes

@ara4n ara4n added the T-Defect label Jul 6, 2023
@kittykat kittykat added X-Needs-Design A-E2EE Encryption S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely X-Needs-Product labels Jul 6, 2023
@ara4n
Copy link
Member Author

ara4n commented Jul 6, 2023

Worse, this means that self-verification will get completely stuck behind the to-device queue, and fail in weird ways (claiming you cancelled it when it actually timed out), and then fail again immediately if you try again, but work the 3rd time. Without a spinner, you expect verification to work.

@ara4n
Copy link
Member Author

ara4n commented Jul 6, 2023

(does this really need design or product input?)

@kegsay
Copy link

kegsay commented Aug 3, 2023

So clients can apply a heuristic today to see if there are more to-device messages. The client can set a limit on how many events they want, and if the response contains that many events then you're still catching up. When it contains < limit then you're good to go. Having a caught_up bool only really helps remove the spinner fractionally earlier when you have a multiple of $limit events afaict.

@ara4n ara4n changed the title No sync spinner while catching up on to-device msgs No spinner while catching up on to-device msgs Aug 21, 2023
@stefanceriu stefanceriu added the X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue label Mar 28, 2024
@bmarty
Copy link
Member

bmarty commented Mar 29, 2024

FWIW, on the Kotlin SDK, as long as they are toDevice Events in the sync v2 response, the sync request timeout is set to 0, to ensure that the next response will return as soon as possible. Similar workarounds have been implemented on other clients.

Related to matrix-org/synapse#11457.

Disclaimer: my comment is maybe not helping, I do not really know how the sliding sync work regarding toDevice Events.

@Hywan
Copy link
Member

Hywan commented Jun 13, 2024

The sync indicator/spinner displayed on the app right now is provided by the RoomListService API.
If you want another sync indicator/spinner for to-device events, it must be provided by the EncryptionSync API. It's really not complex to implement in the SDK, but it needs product and design decisions before that.

@ara4n
Copy link
Member Author

ara4n commented Jul 23, 2024

This continues to be painful - i just turned on my EXA for the first time in a few months, and all the history is UTD, presumably because it's slowly crawling through a huge backlog on to-device msgs... but with no visible indication that it's still catching up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE Encryption O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Design X-Needs-Product X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue
Projects
None yet
Development

No branches or pull requests

6 participants