Cannot accept/reject an invite over federation
Description:
I have an invite from an IRC user (global on snoonet) but when i try to accept or decline it gives me an error: Room '!HaEJfkIQMGuDbPkiAh:matrix.org' does not exist
The matrix user was over federation:
@jack:jack-server.com@_snoonet_Global:matrix.org
Remote HS logs:
homeserver.log.2:2017-02-03 21:33:01,106 - synapse.http.server - 123 - INFO - POST-1069327- <SynapseRequest at 0xfb04998 method=POST uri=/_matrix/client/r0/join/%21HaEJfkIQMGuDbPkiAh%3Amatrix.org?access_token=<redacted> clientproto=HTTP/1.1 site=8448> SynapseError: 403 - Room '!HaEJfkIQMGuDbPkiAh:matrix.org' does not exist
Investigation:
that room was created on Wed 2016-12-21 03:52:34 UTC (~2 months ago) you were last invited to that room on Fri 2017-02-03 12:04:42 UTC (3 days ago) it looks like you did interact with that room previously: there is a replaces_state entry for your m.room.member event with the event ID $148362919587XAfQu:jack-server.com
Given this, and the fact that there is an event ID sent from your server, tells me that your server has forgotten about this room. I don't know why.
Similar to matrix-org/matrix-spec-proposals#1599
Similar to matrix-org/matrix-spec-proposals#761
Im the admin of jack-server.com and the server was unreachable for a time during a DNS change. DNS propagation took about 48 hours during which time matrix.org was unable to reach jack-server.com.
https://matrix.to/#/!XqBunHwQIXUiqCaoxq:matrix.org/$14846723752604812uusVy:matrix.org
Given this, and the fact that there is an event ID sent from your server, tells me that your server has forgotten about this room. I don't know why.
I postulate that this might be because the user had left previously, causing the server to forget the room. I had the same problem with @_snoonet_Global:matrix.org on my HS. I had left this room several times before and there are currently two event_forward_extremities.
The following happens on trying to /leave.
2017-03-13 09:17:35,368 - synapse.access.https.8448 - 59 - INFO - OPTIONS-509810- 83.166.71.13 - 8448 - Received request: OPTIONS /_matrix/client/r0/rooms/!TqAUpYGXuLDBmTFpGJ%3Amatrix.org/leave?access_token=<redacted>
2017-03-13 09:17:35,369 - synapse.access.https.8448 - 91 - INFO - OPTIONS-509810- 83.166.71.13 - 8448 - {None} Processed request: 1ms (0ms, 0ms) (0ms/0) 22B 200 "OPTIONS /_matrix/client/r0/rooms/!TqAUpYGXuLDBmTFpGJ%3Amatrix.org/leave?acces
2017-03-13 09:17:35,379 - synapse.access.https.8448 - 59 - INFO - POST-509811- 83.166.71.13 - 8448 - Received request: POST /_matrix/client/r0/rooms/!TqAUpYGXuLDBmTFpGJ%3Amatrix.org/leave?access_token=<redacted>
2017-03-13 09:17:35,381 - synapse.util.async - 201 - INFO - POST-509811- Acquired linearizer lock 'member' for key ('!TqAUpYGXuLDBmTFpGJ:matrix.org',)
2017-03-13 09:17:35,382 - synapse.util.async - 201 - INFO - POST-509811- Acquired linearizer lock 'state_resolve_lock' for key frozenset([64595, 78692])
2017-03-13 09:17:35,382 - synapse.state - 320 - INFO - POST-509811- Resolving state for !TqAUpYGXuLDBmTFpGJ:matrix.org with 2 groups
2017-03-13 09:17:35,382 - synapse.state - 335 - INFO - POST-509811- Resolving conflicted state for '!TqAUpYGXuLDBmTFpGJ:matrix.org'
2017-03-13 09:17:35,382 - synapse.state - 497 - INFO - POST-509811- Asking for 2 conflicted events
2017-03-13 09:17:35,382 - synapse.state - 508 - INFO - POST-509811- Asking for 0 auth events
2017-03-13 09:17:35,383 - synapse.state - 553 - ERROR - POST-509811- Failed to resolve state
Traceback (most recent call last):
File "/home/lukeb/.synapse/local/lib/python2.7/site-packages/synapse/state.py", line 550, in _resolve_with_state
conflicted_state, auth_events
File "/home/lukeb/.synapse/local/lib/python2.7/site-packages/synapse/state.py", line 597, in _resolve_state_events
auth_events
File "/home/lukeb/.synapse/local/lib/python2.7/site-packages/synapse/state.py", line 634, in _resolve_auth_events
event_auth.check(event, auth_events, do_sig_check=False, do_size_check=False)
File "/home/lukeb/.synapse/local/lib/python2.7/site-packages/synapse/event_auth.py", line 91, in check
"Room %r does not exist" % (event.room_id,)
SynapseError: 403: Room '!TqAUpYGXuLDBmTFpGJ:matrix.org' does not exist
The room not existing error is raised when the state in the room is resolved, but the server has forgotten the room and it now "does not exist". The state resolution occurs purely for logic that runs specifically for [un]banning, which is necessary to get the old_membership, presumably the previous membership state.
The state resolution wouldn't need to run if there were no forward extremities, but there are two in this case.
Extremities -> state resolution -> room doesn't exist
Is there a way to go ahead and clear the invite from the homeserver so its not longer showing up on my client?
bump... also have this issue from nickserv
@jwaterwo : I'd like to investigate what's going on here. Please could you make yourself known to me on matrix (@richvdh:sw1v.org) so that I can get you to poke the db a bit?
Investigation showed this to be the same as matrix-org/matrix-spec-proposals#1987. @jwaterwo was able (eventually) to get rid of the invites in the same way as https://github.com/matrix-org/synapse/issues/1987#issuecomment-292494669.
@richvdh Actually I can't do that workaround if you put an invalid mailadress by accident, what can you do then?
@devz3r0 please open a new issue explaining what you are seeing. this is nothing to to with email addresses.
@richvdh Perhaps the issue is pretty similar to https://github.com/matrix-org/synapse/issues/761 ? Which just got reopened again. Except that the unreachable entity is a mail address and not a host. Should I add my problem to that issue or still open a new one?
It's a known issue that you can't cancel invites which you sent to email addresses - see https://github.com/matrix-org/matrix-doc/issues/613 and matrix-org/matrix-spec#336. This bug, and matrix-org/matrix-spec-proposals#761 is about not being able to reject an invite that you have received.
If in doubt, please always open a new issue. It's always easier to merge duplicate reports than it is to unpick conflicting reports on the same issue.