element-hq / element-hq/synapse
Event with `m.relates_to: null` causes 500 error (AttributeError: 'NoneType' object has no attribute 'get')
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#5404](https://github.com/matrix-org/synapse/issues/5404).
---
### Description
After update to homeserver.py version 0.99.5.2 - in logs I get errors:
```
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/util/metrics.py", line 63, in measured_func
r = yield func(self, *args, **kwargs)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/message.py", line 608, in create_new_client_event
if relation.get("rel_type") == RelationTypes.ANNOTATION:
AttributeError: 'NoneType' object has no attribute 'get'
```
[error.log](https://github.com/matrix-org/synapse/files/3269143/error.log)
### Version information
deb packet: matrix-synapse-py3 0.99.5.2+stretch1 amd64
Debian 9.8
LXC container.
Contributor guide
Assessment
This issue has not been assessed yet.