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

Spurious room upgrade warnings #16068

Open
dbkr opened this issue Jan 4, 2021 · 8 comments
Open

Spurious room upgrade warnings #16068

dbkr opened this issue Jan 4, 2021 · 8 comments
Labels
A-Room-Upgrades 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

@dbkr
Copy link
Member

dbkr commented Jan 4, 2021

I reloaded my dev element after the break and it's now screaming at me that my rooms are vulnerable and need upgrading which is because the js-sdk doesn't know about room version 6 (I hadn't started my local HS yet).

The short term fix is obviously teach the js-sdk about version 6 (matrix-org/matrix-js-sdk#1572), but isn't the point of the string room versions is that the ones that are numeric are comparable to each other so a client that thinks version "5" is fine deduces that version "6" is also fine? Otherwise this is going to happen every time there's a new room version and we forget to tell the js-sdk about it.

@turt2live
Copy link
Member

String room versions means there's no association between 5 and 6, unfortunately. The js-sdk's map of the room versions is meant to be a fallback for when the server is broken and can't be queried for its room versions - if we end up relying on the js-sdk's mappings too much, it means something went wrong somewhere.

For clarity: the intention is that the js-sdk prioritizes the server's room version map as truthful over its own hardcoded state. This means that servers can (and should be able to) set a stable version as unstable, or introduce other versions which the js-sdk is not aware of.

@dbkr
Copy link
Member Author

dbkr commented Jan 5, 2021

Hmm, apparently that is indeed what the spec says. And yes, the point here is that the client couldn't connect to the HS, but this isn't a particularly uncommon scenario. Sounds like we either need to change the spec to make numeric versions comparable or fix js-sdk to cache the server's room version map rather than hardcode one itself.

@turt2live
Copy link
Member

it would still probably need a hardcoded version, but we can probably more aggressively cache things (we know on reload that the server was fine last time, and that the rooms didn't change, so we can stick it in localstorage)

@alan-cugler
Copy link

Hello, I had the version 6 warning come up for my entire server in all its rooms after losing connectivity. I was directed to comment here as it was perceived as a bug. I have since troubleshooted the issue and fixed it. I wanted to bring those findings here since I couldn't find any documentation any where.

My client lost network connection and gave that version 6 warning because my server's SSL certificate had expired in the middle of the day. Once I figured it out, updating the servers cert fixed the networking and version 6 warning for all members on my server.

So I don't need assistance, but I would like this documented some where for people to search. I am a Senior DevOps Engineer and Solution Architect, so it took me 15 minutes to figure out. But someone just trying to throw up a matrix server on their own might not have been able to figure this out, because there was nothing useful that came up googling for the errors/warnings.

@aaronraimist
Copy link
Collaborator

@alan-cugler what version of Element were you using?

@SimonBrandner SimonBrandner added O-Occasional Affects or can be seen by some users regularly or most users rarely and removed P3 labels Jun 24, 2022
@scoates
Copy link

scoates commented May 30, 2023

FWIW, this seems to be still happening to some of our users, and it's on room version 10 with currently-stable/released Element (seems all of our rooms are version 10). Probably related to the exceptions-list of rooms here, which does not include 10 (yet?).

@aaronraimist
Copy link
Collaborator

Someone really needs to create a reminder to update that every time there is a new room version. That line gets forgotten about until people like you notice that the bug has reappeared.

@turt2live
Copy link
Member

Room version 10 has been around for about a year now though, so something else might be going on. That list has always been intended to be lagged behind reality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Room-Upgrades 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

7 participants