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

Element-R: lots of missing rooms, and rooms with missing state #26489

Closed
richvdh opened this issue Nov 1, 2023 · 7 comments
Closed

Element-R: lots of missing rooms, and rooms with missing state #26489

richvdh opened this issue Nov 1, 2023 · 7 comments
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter Z-Labs

Comments

@richvdh
Copy link
Member

richvdh commented Nov 1, 2023

Some rooms completely missing from the UI after initial sync. (#26418 probably not helping here, but doesn't really explain things).

And then when it sees a message from me in a room it magically appears, but with incomplete state (partial membership list; no encryption state; no room name)?

@richvdh richvdh added T-Defect S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow A-Element-R Issues affecting the port of Element's crypto layer to Rust labels Nov 1, 2023
@erikjohnston
Copy link
Member

Have just had to log in again (I restarted chrome and got a "missing session data, logging out..." dialogue).

It appears there are a bunch of rooms that I am joined to appearing in the "Historical" section as "Empty room". Some of them have badge counts. Clicking on them takes me to the classic "room cannot be previewed. Join?" screen. The room IDs match rooms I'm joined to.

Screenshot from 2023-11-01 15-22-34

@t3chguy
Copy link
Member

t3chguy commented Nov 1, 2023

2023-11-01T12:02:22.353Z E Error processing cached sync MatrixError: [403] User @erikj:jki.re not allowed to view events in room !mustDNqaxYqUIdRoZq:vector.modular.im at token StreamToken(room_key=RoomStreamToken(stream=21922190, instance_map=immutabledict({}), topological=None), presence_key=346738944, typing_key=891, receipt_key=MultiWriterStreamToken(stream=31345005, instance_map=immutabledict({})), account_data_key=546291, push_rules_key=579, to_device_key=1144114, device_list_key=23972416, groups_key=0, un_partial_stated_rooms_key=73) (https://jki.re/_matrix/client/v3/rooms/!mustDNqaxYqUIdRoZq%3Avector.modular.im/members?not_membership=leave&at=s21922190_346738944_891_31345005_546291_579_1144114_23972416_0_73)
M_FORBIDDEN: MatrixError: [403] User @erikj:jki.re not allowed to view events in room !mustDNqaxYqUIdRoZq:vector.modular.im at token StreamToken(room_key=RoomStreamToken(stream=21922190, instance_map=immutabledict({}), topological=None), presence_key=346738944, typing_key=891, receipt_key=MultiWriterStreamToken(stream=31345005, instance_map=immutabledict({})), account_data_key=546291, push_rules_key=579, to_device_key=1144114, device_list_key=23972416, groups_key=0, un_partial_stated_rooms_key=73) (https://jki.re/_matrix/client/v3/rooms/!mustDNqaxYqUIdRoZq%3Avector.modular.im/members?not_membership=leave&at=s21922190_346738944_891_31345005_546291_579_1144114_23972416_0_73)
    at parseErrorResponse (https://develop.element.io/bundles/9d497a3efcf0e65af2a8/bundle.js:117926:12)
    at MatrixHttpApi.requestOtherUrl (https://develop.element.io/bundles/9d497a3efcf0e65af2a8/bundle.js:233902:86)
    at async MatrixHttpApi.authedRequest (https://develop.element.io/bundles/9d497a3efcf0e65af2a8/bundle.js:233743:24)
    at async Room.loadMembersFromServer (https://develop.element.io/bundles/9d497a3efcf0e65af2a8/bundle.js:21287:22)
    at async Room.loadMembers (https://develop.element.io/bundles/9d497a3efcf0e65af2a8/bundle.js:21301:26)

This is strange, do you know what room this is? Did you leave the room?

The spec says 403 should only happen if the user was never in the room, but in that case why would you have that room in your cached sync.

image

@t3chguy t3chguy added the X-Needs-Info This issue is blocked awaiting information from the reporter label Nov 1, 2023
@erikjohnston
Copy link
Member

Synapse logs say:

2023-11-01 11:19:03,877 - synapse.http.server - 124 - INFO - GET-27936 - <XForwardedForRequest at 0x7f90ba43c880 method='GET' uri='/_matrix/client/v3/rooms/!mustDNqaxYqUIdRoZq%3Avector.modular.im/members?not_membership=leave&at=s21922057_346734974_612_31344625_546274_579_1143912_23913075_0_73' clientproto='HTTP/1.1' site='8000'> SynapseError: 403 - User @erikj:jki.re not allowed to view events in room !mustDNqaxYqUIdRoZq:vector.modular.im at token StreamToken(room_key=RoomStreamToken(stream=21922057, instance_map=immutabledict({}), topological=None), presence_key=346734974, typing_key=612, receipt_key=MultiWriterStreamToken(stream=31344625, instance_map=immutabledict({})), account_data_key=546274, push_rules_key=579, to_device_key=1143912, device_list_key=23913075, groups_key=0, un_partial_stated_rooms_key=73)

so appears that Synapse 403s you if you ask for members from a point of history you're not allowed to see? That room is a DM, which I'm currently joined.

Though looking at the DB I don't see how I wouldn't be allowed to see that history, will have a further look.

@erikjohnston
Copy link
Member

Hmm, annoyingly this looks index corruption on my DB 😱

@t3chguy
Copy link
Member

t3chguy commented Nov 1, 2023

I think this (exploding during replaying cached sync if /members fails) might be fixed by matrix-org/matrix-js-sdk#3830 given the code path - @richvdh do you agree?

@erikjohnston
Copy link
Member

Rebuilding the index and clearing + reloading the cache seems to have fixed this.

Sorry for the distraction :(

@t3chguy t3chguy closed this as completed Nov 2, 2023
@richvdh
Copy link
Member Author

richvdh commented Nov 2, 2023

I think this (exploding during replaying cached sync if /members fails) might be fixed by matrix-org/matrix-js-sdk#3830 given the code path - @richvdh do you agree?

As I already said:

#26418 probably not helping here, but doesn't really explain things).

The PR you link to is the fix to #26418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter Z-Labs
Projects
None yet
Development

No branches or pull requests

3 participants