element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.03k stars 1.96k forks source link

device_keys values must be a list of strings #19842

Closed dm-msk closed 2 years ago

dm-msk commented 2 years ago

Steps to reproduce

Hello. We have old RiotIM client for x32 PCs. After last upgrade we got an error "device_keys values must be a list of strings" during send of message. Can we have temporary workaroud, may be some options in client or server, while we'll migrating to x64 PCs?

Outcome

What did you expect?

What happened instead?

Operating system

No response

Application version

1.5.15.0

How did you install the app?

No response

Homeserver

No response

Will you send logs?

No

t3chguy commented 2 years ago

Please put this as a comment on the 32 bit windows issue https://github.com/vector-im/element-web/issues/13175

fidoman commented 10 months ago

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)),