Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

"No auth events in create event" when trying to join a room which has been cleared by delete_old_current_state_events, over federation #7835

Closed
richvdh opened this issue Jul 13, 2020 · 4 comments · Fixed by #7859

Comments

@richvdh
Copy link
Member

richvdh commented Jul 13, 2020

attempts to join #trains:matrix.org get rejected with {"errcode":"M_FORBIDDEN","error":"No create event in auth events"}

@richvdh
Copy link
Member Author

richvdh commented Jul 13, 2020

#trains:matrix.org pointed at !nbFIKfGALdKNFiwmib:matrix.org, a room in which the last user left on 2015-12-03. As such, it's not surprising that attempts to fail join it; what is surprising is that you get that error. (The expected error when trying to rejoin an empty room is "No known servers" - see #1533).

@richvdh richvdh changed the title "No auth events in create event" when trying to join #trains:matrix.org "No auth events in create event" when trying to join #trains:matrix.org over federation Jul 13, 2020
@richvdh
Copy link
Member Author

richvdh commented Jul 13, 2020

ah right. "No known servers" only happens when you attempt to join an empty room on your own server; if you attempt to join an empty room via a remote server, you normally find yourself in an empty room (see #6958).

#trains is a little bit magical because not only does it have no active members it has no event_forward_extremities (or, for that matter, event_backward_extremities), meaning that you can't join it over federation either.

I'm not really sure how it got into that state, but given it was last used in 2015, I don't propose to investigate much further.

I've freed up #trains:matrix.org so it can be used for a new room.

@richvdh richvdh closed this as completed Jul 13, 2020
@richvdh
Copy link
Member Author

richvdh commented Jul 13, 2020

ah, I see it now. This room will have been cleaned up by the delete_old_current_state_events database schema update, which we ran on matrix.org around February this year. That clears out event_forward_extremities for any cleaned rooms.

@richvdh richvdh changed the title "No auth events in create event" when trying to join #trains:matrix.org over federation "No auth events in create event" when trying to join a room which has been cleared by delete_old_current_state_events, over federation Jul 13, 2020
@richvdh richvdh reopened this Jul 13, 2020
@richvdh
Copy link
Member Author

richvdh commented Jul 13, 2020

I've reopened this, though arguably it's a duplicate of #6958, since a fix to one is likely to fix both. (In short: we shouldn't generate join events for rooms we're not in, regardless of how many extremities we think we have).

richvdh added a commit that referenced this issue Jul 15, 2020
We shouldn't allow others to make_join through us if we've left the room;
reject such attempts with a 404.

Fixes #7835. Fixes #6958.
richvdh added a commit that referenced this issue Jul 16, 2020
We shouldn't allow others to make_join through us if we've left the room;
reject such attempts with a 404.

Fixes #7835. Fixes #6958.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant