element-hq / element-hq/synapse
User is unable to accept an invite to rejoin a room
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#8796](https://github.com/matrix-org/synapse/issues/8796).
---
`@ji-ef:matrix.org` reports they are unable to join invite-only room for which they have received an invite. The request fails with
> "The person who invited you already left the room, or their server is offline."
However, this does not appear to be the case.
event-creator logs:
```
2020-11-22 18:08:24,580 - synapse.http.client - 381 - INFO - POST-1274557- - Received response to POST http://10.103.0.2:9092/_synapse/replication/remote_join/%21xAvaEUXjMaaZjJCvmr%3Amatrix.nikel.me/%40ji-ef%3Amatrix.org/AzNFisDvFw: 404
2020-11-22 18:08:24,581 - synapse.http.server - 74 - INFO - POST-1274557 - SynapseError: 404 - Unknown room !xAvaEUXjMaaZjJCvmr:matrix.nikel.me
2020-11-22 18:08:24,582 - synapse.access.http.8095 - 331 - INFO - POST-1274557 - 2001:41d0:fe21:d200:226:18ff:fe9c:b2c9 - 8095 - {@ji-ef:matrix.org} Processed request: 0.785sec/-0.000sec (0.007sec, 0.001sec) (0.002sec/0.022sec/6) 84B 404 "POST /_matrix/client/r0/join/!xAvaEUXjMaaZjJCvmr%3Amatrix.nikel.me HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0" [1 dbevts]
```
main process logs:
```
2020-11-22 18:08:23,836 - synapse.replication.http.membership - 82 - INFO - POST-7542229 - remote_join: @ji-ef:matrix.org into room: !xAvaEUXjMaaZjJCvmr:matrix.nikel.me
2020-11-22 18:08:23,841 - synapse.http.federation.well_known_resolver - 246 - INFO - POST-7542229- - Fetching https://matrix.nikel.me/.well-known/matrix/server
2020-11-22 18:08:23,931 - synapse.http.federation.well_known_resolver - 193 - INFO - POST-7542229- - Error parsing well-known for b'matrix.nikel.me': Non-200 response 404
2020-11-22 18:08:24,108 - synapse.http.matrixfederationclient - 204 - INFO - POST-7542229 - {GET-O-4167477} [matrix.nikel.me] Completed request: 200 OK in 0.27 secs - GET matrix://matrix.nikel.me/_matrix/federation/v1/make_join/%21xAvaEUXjMaaZjJCvmr%3Amatrix.nikel.me/%40ji-ef%3Amatrix.org?ver=1&ver=2&ver=3&ver=4&ver=5&ver=6
2020-11-22 18:08:24,319 - synapse.http.matrixfederationclient - 204 - INFO - POST-7542229 - {PUT-O-4167478} [matrix.nikel.me] Completed request: 200 OK in 0.20 secs - PUT matrix://matrix.nikel.me/_matrix/federation/v2/send_join/%21xAvaEUXjMaaZjJCvmr%3Amatrix.nikel.me/%24LXmL86UJTmtCapBclYu5U5rcqYqaaEj4XA6S928aI6w
2020-11-22 18:08:24,414 - synapse.http.client - 381 - INFO - POST-7542229- - Received response to POST http://10.103.0.2:8110/_synapse/replication/fed_send_events/dWRDWBpNZG: 200
2020-11-22 18:08:24,562 - synapse.http.client - 381 - INFO - POST-7542229- - Received response to POST http://10.103.0.2:8110/_synapse/replication/fed_send_events/ajIqzGfNuo: 200
2020-11-22 18:08:24,563 - synapse.replication.tcp.client - 236 - INFO - POST-7542229 - Waiting for repl stream 'events' to reach 1658357933
2020-11-22 18:08:24,572 - synapse.replication.tcp.client - 239 - INFO - POST-7542229 - Finished waiting for repl stream 'events' to reach 1658357933
2020-11-22 18:08:24,577 - synapse.http.server - 74 - INFO - POST-7542229 - SynapseError: 404 - Unknown room !xAvaEUXjMaaZjJCvmr:matrix.nikel.me
2020-11-22 18:08:24,578 - synapse.access.http.9092 - 331 - INFO - POST-7542229 - ::ffff:10.103.0.2 - 9092 - {@ji-ef:matrix.org} Processed request: 0.743sec/-0.000sec (0.049sec, 0.002sec) (0.007sec/0.034sec/6) 84B 404 "POST /_synapse/replication/remote_join/%21xAvaEUXjMaaZjJCvmr%3Amatrix.nikel.me/%40ji-ef%3Amatrix.org/AzNFisDvFw HTTP/1.1" "Synapse/1.22.1 (b=matrix-org-hotfixes,52984e9e6)" [0 dbevts]
```
It looks like the main process is complaining that it can't find a `create` event in `current_state_events` for that room, and indeed `current_state_events` contains no entries for that room at all. I've not looked for reasons this might happen (though I suspect it's getting confused by the previous state in that room)
Contributor guide
Assessment
This issue has not been assessed yet.