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

Clear cache & reload breaks membership in rooms suggested by a Space in (only) Element Web #2503

Closed
bones-was-here opened this issue May 30, 2022 · 12 comments · Fixed by #2507

Comments

@bones-was-here
Copy link

Background information

  • Dendrite version or git SHA: 0.8.6
  • Monolith or Polylith?: monolith
  • SQLite3 or Postgres?: postgres
  • Running in Docker?: no
  • go version: 1.17.9
  • Client used (if applicable): element web, element android

Description

  • What is the problem: room membership changes and becomes inconsistent, seemingly at random, when updating and/or restarting
  • Who is affected:
  • How is this bug manifesting: element web shows I am no longer in some rooms, and cannot access the room when trying to rejoin, but in element android I am still able to participate in the same rooms. Additionally, the server reverts to participating in the old #dendrite room, requiring evacuateRoom to be used again.
  • When did this first appear: unknown

Steps to reproduce

  • update and/or restart dendrite, observe that membership has changed and is now inconsistent between clients
  • clearing cache and/or re-logging has no effect

When trying to "re"-join the rooms in element web, dendrite will log a successful room join, but the spinner continues endlessly in element web, and when refreshing it's back to showing the room as not joined. The options seem to be:

  • access the room using element android only
  • leave the room using curl or element android, and re-join it

These are all public v6 rooms.

When the errors for the old #dendrite start being logged again, I check the state in element web and it shows I'm both in the room (listed in the user list) and not in the room (room is being previewed, with a button to join).
When I do GET /_dendrite/admin/evacuateRoom/!yomrOFwgFXzmeMAbzX:matrix.org
it returns {"affected":["@bones_was_here:xonotic.org"]}
and on a second GET it returns the empty array (until the next time it reverts).

@bones-was-here
Copy link
Author

This happened again when updating from 992d324 to 0.8.7 on golang 1.17.10.

Not the reversion of !yomrOFwgFXzmeMAbzX:matrix.org membership, I suspect that was a separate issue (state resolution problem).

After the restart, in Element Web I was no longer a member of a specific room (same one that's been having this issue previously), and could not access it despite logging successful join messages. In Element Android there was no change, I could still access the room normally. In matrix.org's perspective, there was no change.

@neilalexander neilalexander reopened this Jun 1, 2022
@bones-was-here
Copy link
Author

This happened again with 1 room and no restart of dendrite. As usual, element web became unable to access the room, cache clear & re-logging had no effect, but it was still working normally in element android. Leaving and re-joining the room in Android fixed it for now.

@bones-was-here bones-was-here changed the title Room memberships break inconsistently when updating/restarting Room memberships sometimes break by becoming inconsistent between clients Jun 2, 2022
@bones-was-here
Copy link
Author

bones-was-here commented Jun 2, 2022

I'm wondering if this is somehow related to spaces summary, which is enabled on my homeservers. So far I have only seen it happen with rooms that are members of a public space i'm in (and these rooms claim that space as their canonical parent).

@McSinyx
Copy link

McSinyx commented Jun 8, 2022

Which curl command did you use to leave a room? BTW I'm facing this on 0.8.5 with Element Web. The issue emerged last week I think with two rooms affected.

@bones-was-here
Copy link
Author

bones-was-here commented Jun 8, 2022

curl -v 'https://example.com/_matrix/client/r0/rooms/!yomrOFwgFXzmeMAbzX:matrix.org/leave' -H 'Authorization: Bearer your_access_token' -d ''

@McSinyx
Copy link

McSinyx commented Jun 8, 2022 via email

@bones-was-here
Copy link
Author

bones-was-here commented Jul 4, 2022

This is consistently happening on 0.8.9, 0.9.1, 10a151c with 3 rooms, all "suggested" by a Space, when doing clear cache & reload in element web.

Possible clue: when viewing the room list under Home or Other rooms (instead of the Space), the option to forget the room appears. Clicking it fails by saying that i'm still in the room, which is true, but the heading of the dialog is "Failed to forget room M_UNKNOWN".

@bones-was-here
Copy link
Author

Hmmm a new message dot and bold text appeared in element web for a room i'm "not in"

@bones-was-here
Copy link
Author

A better workaround to restore access to the room in Element Web is to post a message to it using Element Android.

@bones-was-here bones-was-here changed the title Room memberships sometimes break by becoming inconsistent between clients Clear cache & reload breaks membership in rooms suggested by a Space in (only) Element Web Aug 6, 2022
@bones-was-here
Copy link
Author

I think this is fixed, as of 522bd29 I can no longer reproduce it.

Element web was open (but not in use, on another screen) when suddenly over 9000 notifications for old messages appeared and most rooms and spaces disappeared from the sidebar. A clear cache & reload fixed that, without the side effect of kicking me out of the same 3 rooms as usual. It seems I can do clear cache & reload repeatedly without causing membership issues now.

@neilalexander
Copy link
Contributor

Can you please just double-check that this is still true as of 07dd9bd before I cut a release?

@bones-was-here
Copy link
Author

It appears to still be fixed. Not sure if this has an issue but previously clear cache & reload would cause chat history to have @user:domain instead of display names in element web, that appears to be fixed also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants