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

Room forget doesn't work when room is sticky #26195

Open
maheichyk opened this issue Sep 19, 2023 · 2 comments
Open

Room forget doesn't work when room is sticky #26195

maheichyk opened this issue Sep 19, 2023 · 2 comments
Labels
A-Room-List O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@maheichyk
Copy link
Contributor

maheichyk commented Sep 19, 2023

Steps to reproduce

Invite - Forget case:

  1. User is invited into the room
  2. User rejects invitation
  3. User clicks on the rejected room (room is sticky now) in room list in Historical section -> at these step errors are written to the console (see outcome)
  4. User clicks on Forget Room via room options -> "Tried to remove unknown room from im.vec ..." is written to console
  5. Room is not removed from room list

The same problem happens when user tries to forget knocked room that was denied/cancelled:
Knock - Denied case:

  1. User knocks to room
  2. User knock request is denied
  3. User clicks on the room (room is sticky now) -> at these step errors are written to the console (see outcome)
  4. User clicks on Forget Room -> "Tried to remove unknown room from im.vec ..." is written to console
  5. Room is not removed from room list

Knock - Cancel case:

  1. User knocks to room
  2. User knock request is cancelled
  3. User clicks on the room (room is sticky now) -> at these step errors are written to the console (see outcome)
  4. User clicks on Forget Room -> "Tried to remove unknown room from im.vec ..." is written to console
  5. Room is not removed from room list

Outcome

What did you expect?

On step 3 user sees the same errors in the logs:

M_FORBIDDEN: MatrixError: [403] User @bob:local.ma not allowed to view events in room !tXEusAxEAqvMXuivqC:local.ma at token StreamToken(room_key=RoomStreamToken(topological=None, stream=300, instance_map=immutabledict({})), presence_key=1311, typing_key=0, receipt_key=100, account_data_key=99, push_rules_key=1, to_device_key=1, device_list_key=53, groups_key=0, un_partial_stated_rooms_key=1) (http://localhost:8008/_matrix/client/v3/rooms/!tXEusAxEAqvMXuivqC%3Alocal.ma/members?not_membership=leave&at=s300_1311_0_100_99_1_1_53_0_1)
    at parseErrorResponse (http://localhost:8080/bundles/_dev_/bundle.js:47507:12)
    at MatrixHttpApi.requestOtherUrl (http://localhost:8080/bundles/_dev_/bundle.js:47212:78)
consoleObj.<computed> @ rageshake.ts:74
(anonymous) @ logger.ts:48
(anonymous) @ room.ts:1050
Promise.catch (async)
loadMembersIfNeeded @ room.ts:1047
getEncryptionTargetMembers @ room.ts:1714
shieldStatusForRoom @ ShieldUtils.ts:35
updateE2EStatus @ RoomView.tsx:1518
(anonymous) @ RoomView.tsx:1393
(anonymous) @ RoomView.tsx:770
componentDidMount @ RoomView.tsx:962
commitLifeCycles @ react-dom.development.js:20663
commitLayoutEffects @ react-dom.development.js:23426
callCallback @ react-dom.development.js:3945
invokeGuardedCallbackDev @ react-dom.development.js:3994
invokeGuardedCallback @ react-dom.development.js:4056
commitRootImpl @ react-dom.development.js:23151
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
commitRoot @ react-dom.development.js:22990
performSyncWorkOnRoot @ react-dom.development.js:22329
(anonymous) @ react-dom.development.js:11327
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
flushSyncCallbackQueueImpl @ react-dom.development.js:11322
flushSyncCallbackQueue @ react-dom.development.js:11309
scheduleUpdateOnFiber @ react-dom.development.js:21893
enqueueSetState @ react-dom.development.js:12467
Component.setState @ react.development.js:365
setState @ MatrixChat.tsx:475
viewRoom @ MatrixChat.tsx:1053
(anonymous) @ MatrixChat.tsx:758
invokeCallback @ dispatcher.ts:120
(anonymous) @ dispatcher.ts:97
setTimeout (async)
dispatch @ dispatcher.ts:170
(anonymous) @ RoomTile.tsx:241
callCallback @ react-dom.development.js:3945
invokeGuardedCallbackDev @ react-dom.development.js:3994
invokeGuardedCallback @ react-dom.development.js:4056
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4070
executeDispatch @ react-dom.development.js:8243
processDispatchQueueItemsInOrder @ react-dom.development.js:8275
processDispatchQueue @ react-dom.development.js:8288
dispatchEventsForPlugins @ react-dom.development.js:8299
(anonymous) @ react-dom.development.js:8508
batchedEventUpdates$1 @ react-dom.development.js:22396
batchedEventUpdates @ react-dom.development.js:3745
dispatchEventForPluginEventSystem @ react-dom.development.js:8507
attemptToDispatchEvent @ react-dom.development.js:6005
dispatchEvent @ react-dom.development.js:5924
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
discreteUpdates$1 @ react-dom.development.js:22413
discreteUpdates @ react-dom.development.js:3756
dispatchDiscreteEvent @ react-dom.development.js:5889

On step 4 the warning:
Tried to remove unknown room from im.vector.fake.archived: !tXEusAxEAqvMXuivqC:local.ma

What happened instead?

No errors, room should be forgotten.

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

No

Relates to the Epic: #18655

@weeman1337
Copy link
Contributor

Can reproduce. Sent logs.

@weeman1337 weeman1337 added S-Minor Impairs non-critical functionality or suitable workarounds exist A-Room-List O-Occasional Affects or can be seen by some users regularly or most users rarely labels Oct 9, 2023
@benparsons
Copy link
Member

Does the problem still occur when using forget_rooms_on_leave synapse option? https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#forget_rooms_on_leave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Room-List O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants