-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Event with m.relates_to: null
causes 500 error (AttributeError: 'NoneType' object has no attribute 'get')
#5404
Comments
Seeing this on 1.0.0 as well. Possibly introduced in #5212? |
I see this happens when you try to send an event. What is the body of the event you are sending? |
I do not know.
|
I think last error occur when user try get big image (more then 4000x4000 pixels). |
yes, it seems to be unrelated, and probably #5304. |
At least one third-party bridge sends such events, and it used to work. It was broken in some Synapse update, hence it's certainly a regression. mautrix/telegram#336 this bridge has already worked around this problem, though |
@WGH-: please can you share an example of an event that causes this problem? |
I think an example of such event is provided in the opening message of the linked issue. Here's copy-paste:
[2019-06-15 21:32:07,871] [DEBUG@mau.as.api] PUT /room/%21mMWGhycXzeDvpkjCzk%3Aroom409.xyz/send/m.room.message/61560634327871 {"body": "Forever", "msgtype": "m.text", "m.relates_to": null, "external_url": "https://t.me/c /1050980458/48908"} as user @telegram_163061100:room409.xyz
…On July 15, 2019 12:32:55 PM GMT+03:00, Richard van der Hoff ***@***.***> wrote:
@WGH-: please can you share an example of an event that causes this
problem?
|
thanks |
m.relates_to: null
causes 500 error (AttributeError: 'NoneType' object has no attribute 'get')
It's unclear to me what the correct behaviour is here. I've raised https://github.com/matrix-org/matrix-doc/issues/2178 to track |
Disclaimer: I'm not a developer of said bridge, and I took "It's a bug in synapse" (mentioned in that ticket) for granted. Maybe it's something more complicated. This is the commits that seem to be related to it: |
It's clear that returning a 500 and logging a stacktrace is not the correct behaviour. As per the matrix-doc issue, there is scope to debate whether the correct behaviour is to treat the event as invalid and return a 400, or to ignore the invalid |
Description
After update to homeserver.py version 0.99.5.2 - in logs I get errors:
error.log
Version information
deb packet: matrix-synapse-py3 0.99.5.2+stretch1 amd64
Debian 9.8
LXC container.
The text was updated successfully, but these errors were encountered: