Skip to content

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

Closed

Description

@Lynnolium

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

Activity

  1. SimonBrandner commented on Sep 11, 2021

    @SimonBrandner
    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

  2. added
    X-Needs-InfoThis issue is blocked awaiting information from the reporter
    on Sep 11, 2021
  3. Lynnolium commented on Sep 11, 2021

    @Lynnolium
    Author

    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.

  4. SimonBrandner commented on Sep 12, 2021

    @SimonBrandner
    Contributor

    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

  5. mcg-matrix commented on Sep 13, 2021

    @mcg-matrix

    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.

  6. aaronraimist commented on Sep 13, 2021

    @aaronraimist
    Collaborator

    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.

  7. novocaine commented on Sep 15, 2021

    @novocaine
    Contributor

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

  8. fidoman commented on Nov 19, 2023

    @fidoman

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-DefectX-Needs-InfoThis issue is blocked awaiting information from the reporter

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions