Duplicate DM in room list seen on Element X iOS
https://github.com/matrix-org/sliding-sync/issues/325 was reported by @valynor three weeks ago. To quote their original report:
iPad Mini 2019, iOS 17.0.2, Element-X 1.3.1
I have a duplicate DM in the room list. It's only on EX, not in any of my 4 other sessions.
The first instance of the DM works normally. The 2nd instance:
* cannot be tapped (no reaction) * can be long-pressed but choosing leave room just gives "Sorry, an error occurred"There's no way to get rid of this duplicate room - a "clear cache & reload" would probably fix this but EX does not have this implemented yet.
Please add "clear cache & reload" soon, I'm using Element for ~3 years now and it reliably fixes things like these on regular Element iOS and Element-Web. EX really needs this setting, too.
In https://github.com/matrix-org/sliding-sync/issues/325#issuecomment-1777034903 I looked at the proxy logs and database to see if there was anything that could explain this behaviour, but didn't see any smoking guns. In the rageshake logs, I saw
ERROR elementx: Failed retrieving room with identifier: invalidated-!aBMLyCTbDuLlIkbReo:matrix.org
ERROR elementx: Invalid room identifier: invalidated-!aBMLyCTbDuLlIkbReo:matrix.org
ERROR elementx: Invalid roomListItem for identifier invalidated-!aBMLyCTbDuLlIkbReo:matrix.org
Speaking to the client folks (internal link), this is part of an attempt to "work around duplicated rooms". It doesn't seem to be working in this case though. Jonas seemed to understand how to fix this, though I confess the details went over my head.
One other thing I noticed in the rageshake was warnings of the form
WARN matrix_sdk_ui::timeline::traits: Unknown room version, falling back to v10 | crates/matrix-sdk-ui/src/timeline/traits.rs:82 | spans: root > build{room_id="!aBMLyCTbDuLlIkbReo:matrix.org" events_length=3 track_read_receipts=true prev_token="t621-4039038876_757284974_37752788_2224310583_2280660562_4395079_964647566_7819971614_0_138381"}
WARN matrix_sdk_ui::timeline::traits: Unknown room version, falling back to v10 | crates/matrix-sdk-ui/src/timeline/traits.rs:82 | spans: root > build{room_id="!aBMLyCTbDuLlIkbReo:matrix.org" events_length=3 track_read_receipts=true prev_token="t621-4039038876_757284974_37752788_2224310583_2280660562_4395079_964647566_7819971614_0_138381"} > add_initial_events
WARN matrix_sdk_ui::timeline::traits: Unknown room version, falling back to v10 | crates/matrix-sdk-ui/src/timeline/traits.rs:82 | spans: root > build{room_id="!aBMLyCTbDuLlIkbReo:matrix.org" events_length=3 track_read_receipts=true prev_token="t621-4039038876_757284974_37752788_2224310583_2280660562_4395079_964647566_7819971614_0_138381"} > room_update_handler{room_id="!aBMLyCTbDuLlIkbReo:matrix.org"} > handle_joined_room_update
WARN matrix_sdk_ui::timeline::traits: Unknown room version, falling back to v10 | crates/matrix-sdk-ui/src/timeline/traits.rs:82 | spans: root > paginate_backwards{room_id="!aBMLyCTbDuLlIkbReo:matrix.org" options=UntilNumItems { items: 50, event_limit: 20 }} > handle_back_paginated_events
I could see from the matrix.org DB that this is a version 9 room, not 10. I don't think this has any huge consequences, but it makes me slightly scared that the client isn't getting the room version information from the proxy.
@jplatte Did we make any progress on solving this duplication stuff?
No, I wasn't sure whether it makes sense to put time into this given your work on client-side sorting. But if that isn't happening soon, we can sync on what I think the problem is / how we could fix it.
@jplatte I'd very much appreciate you looking into this - I still have the duplicate DM in my list of rooms. I even tried to delete the room completely and start the chat fresh, did not help. The duplicate is still present.
@Hywan
After joining/leaving a few more rooms, the original duplicate DM disappeared and it was fine for a couple days. Then another DM got duplicated and this one too cannot be deleted.
Fixed by https://github.com/matrix-org/matrix-rust-sdk/pull/3585.