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

Error message: 'device_keys' values must be a list of strings #18992

Closed
Lynnolium opened this issue Sep 11, 2021 · 7 comments
Closed

Error message: 'device_keys' values must be a list of strings #18992

Lynnolium opened this issue Sep 11, 2021 · 7 comments
Labels
T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@Lynnolium
Copy link

Steps to reproduce

  1. Where are you starting? What can you see? Running v1.5.15 32 bit on accessed server. Server is running Synapse as the OS.
  2. What do you click? Enter authorized encrypted room (unencrypted rooms are fine)
  3. More steps… Attempting to send a reply generated red text and the error of 'device_keys' values must be a list of strings. Other posts in the room are readable (decrypted)

What happened?

What did you expect? The reply to post to be sent and accepted by server properly. NOTE: The same version (1.5.15) on a different server works 100% in both encrypted and unencrypted rooms.

What happened? The error message was displayed, The to be sent text was changed to red and post was not uploaded to the room.

Operating system

Windows 32 bit Ultimate

Application version

32 bit build 1.5.15 (latest)

How did you install the app?

from downloadable file on element server.

Homeserver

No response

Have you submitted a rageshake?

No

@SimonBrandner
Copy link
Contributor

@Lynnolium, I am quite confused by your report... The latest Element version is 1.8.2 but you claim 1.5.15? Are you really on that version? Could you please send logs they might be essential to figuring out what is going on here

@SimonBrandner SimonBrandner added the X-Needs-Info This issue is blocked awaiting information from the reporter label Sep 11, 2021
@Lynnolium
Copy link
Author

Lynnolium commented Sep 11, 2021

Im using the 32 bit version. That last build for it was 1.5.15. I can verify that the 64 bit 1.8.2 on a 64 bit OS, and the browser version on a win7 32 bit computer both work correctly. The issue is only seen on the standalone 1.5.15.

I will get a copy of the log from the server. The server is running syanpse.

@SimonBrandner
Copy link
Contributor

SimonBrandner commented Sep 12, 2021

Oh, you're running 1.5.15 (which is super outdated) on a 32bit system since the newer versions don't support that... I didn't put it together at first.

I am afraid we don't support 32bit systems anymore (since Electron doesn't either), sorry

@mcg-matrix
Copy link

Several of my users are reporting seeing this error message popping up in their Riot-Android installations whenever they try to post a message in an encrypted room. Typically, they are stuck with Riot-Android and unable to upgrade to Element-Android because of an old Android environment (e.g. in Sailfish OS).

In my case, on 2021-Sep-08 between 08:12:43 UTC and 09:38:42 UTC, the Matrix homeserver hosted by EMS started to reply with a 400 response to "POST /_matrix/client/unstable/keys/query" requests placed by "Riot.im/0.9.13".

So I guess this is a server-side issue with the Client-Server API (some non-backward-compatible change happened), but I have no clue where to look or what to ask for. If anyone has a hint or knows of a workaround (possibly involving a reverse-proxy doing some magic between Riot-Android and the Matrix homeserver), I'd be grateful for help.

@aaronraimist
Copy link
Collaborator

aaronraimist commented Sep 13, 2021

Looks like it is caused by matrix-org/synapse#10593

Any work around you put in place just encourages more people to run very out of date software. At some point they need to update.

@novocaine
Copy link
Contributor

We won't fix this as it affects a very old version.

@fidoman
Copy link

fidoman commented Nov 19, 2023

workaround for synapse 1.71
fix it in place, so after server upgrade users can connect with riot and upgrade to element without service disruption
(as fresh element client refuse to work with old server you must first upgrade server)

/opt/venvs/matrix-synapse/lib/python3.10/site-packages/synapse/rest/client

--- keys.py-orig        2023-11-15 23:30:51.746311535 +0000
+++ keys.py     2023-11-15 20:40:33.766275710 +0000
@@ -171,6 +171,9 @@
         def is_list_of_strings(values: Any) -> bool:
             return isinstance(values, list) and all(isinstance(v, str) for v in values)

+        for k, v in device_keys.items():
+          if v=={}: device_keys[k]=[]
+
         if any(not is_list_of_strings(keys) for keys in device_keys.values()):
             raise InvalidAPICallError(
                 "'device_keys' values must be a list of strings:%s BODY:%s"%(repr(device_keys), repr(body)),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

6 participants