-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Gracefully handle when rooms in space pagination token expires - Unable to paginate rooms in the space /hierarchy
-> 400 Unknown pagination token
#22138
Comments
Sorry, where does the https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv1roomsroomidhierarchy API say that the token can expire? |
Element is performing as per the spec, I suggest trying to reproduce on Android & iOS and I'm sure you'll find the same failure mode. Synapse or the Spec are wrong, the onus is on Synapse to prove which is which. |
Regardless of if the pagination token should expire or not, when I filter the space in Element, it should keep paginating the rooms in a space until it reaches the end. There were no results to fill up the scroll area to stop it and the loading spinner was still showing when I stopped filtering. I can actually confirm this because I took a screenshot of the unfiltered list with the loading spinner at the bottom which clearly indicates it wasn't done paginating and should have kept going during my filter (to extra confirm it's not just a stuck spinner, the list isn't complete). If preferred, I can create a separate issue for this though. It's very related to how I ran into this situation in the first place though. I've just searched again and reached a proper end state which wasn't there:
|
per matrix-org/synapse#12697 (comment) I am reopening this as a client-side problem. |
spec issue: matrix-org/matrix-spec#1058 |
In terms of design decisions:
|
Downgrading this to occasional and minor, since I don't believe this happens super regularly, and the workaround is to reopen the space landing page and try again |
Just noting on this - it's really tough for us to make the right design decisions without pairing closely on the considerations or tradeoffs of any path with engineering. So, whoever ends up looking at this, please feel free to reach out for us to figure out the right path. |
Spec still hasn't been clarified. |
Would it help if the homeserver returned I don't think it would necessary help for the spec to say that tokens can expire. If a homeserver implemented the session store in-memory, and the homeserver was restarted, you'd still get the same failure mode. |
The spec currently says |
Steps to reproduce
Failed to load list of rooms.
message in Element and the underlying network request errors:GET https://matrix-client.matrix.org/_matrix/client/v1/rooms/!OJBlkJuUrsKnqtNnTi%3Amatrix.org/hierarchy?suggested_only=false&from=iDciuFbCVinPIwUGYtUzQLHO&limit=20
-> ❌ 400 bad requestI first created an issue in the Synapse tracker thinking the bad pagination token was being returned from the homeserver but it turns out there was just a 5 minute gap between pagination requests and Synapse only keeps track of pagination tokens within a 5 minute window.
What I think happened is this:
/hierarchy
requestFailed to load list of rooms.
error and underlying network error/hierarchy
❌ 400 bad requestI think this is the last request Element made while I was searching/filtering even though it had a
next_batch
, and the spinner was still showing.GET https://matrix-client.matrix.org/_matrix/client/v1/rooms/!OJBlkJuUrsKnqtNnTi%3Amatrix.org/hierarchy?suggested_only=false&from=rCkHRkRndYnCOIInVookuxrI&limit=20
-> ✅ 200 OKdate: Tue, 10 May 2022 19:02:38 GMT
(response header)Then 7 minutes later, I cleared the search/filter and tried paginating manually by scrolling to the bottom of the list:
GET https://matrix-client.matrix.org/_matrix/client/v1/rooms/!OJBlkJuUrsKnqtNnTi%3Amatrix.org/hierarchy?suggested_only=false&from=iDciuFbCVinPIwUGYtUzQLHO&limit=20
-> ❌ 400 Bad requestdate: Tue, 10 May 2022 19:08:58 GMT
(response header)Outcome
What did you expect?
Explore rooms
#17550What happened instead?
Failed to load list of rooms.
.Logs: https://github.com/matrix-org/element-web-rageshakes/issues/12829
Operating system
Windows 10
Browser information
Chrome Version 100.0.4896.127
URL for webapp
https://develop.element.io/
Application version
Element version: 479d4bf-react-14127c777b87-js-34cfa511049e Olm version: 3.2.8
Homeserver
matrix.org
Will you send logs?
Yes -> https://github.com/matrix-org/element-web-rageshakes/issues/12829
The text was updated successfully, but these errors were encountered: