Mjolnir crashes when acceptInvitesFromSpace isn't set.
JokerGermany opened this issue · comments
JokerGermany commented
This was the Problem and Conversation in the mjolnir Matrix Room
It looks like when acceptInvitesFromSpace
isn't set, that mjolnir crashes when someone invites mjolnir to a room.
Nov 24 12:34:44 myhost node[0000]: Thu, 24 Nov 2022 11:34:44 GMT [ERROR] [MatrixHttpClient] (REQ-609) [Error: Error during MatrixClient request GET /_matrix/client/v3/rooms/!noop%3Aexample.org/joined_members: 403 Forbidden -- {"errcode":"M_FORBIDDEN","error":"User @modbot:tchncs.de not in room !noop:example.org, and room previews are disabled"}]
Nov 24 12:34:44 myhost node[0000]: Thu, 24 Nov 2022 11:34:44 GMT [ERROR] [Mjolnir] Mjolnir is not in the space configured for acceptInvitesFromSpace, did you invite it?
Nov 24 12:34:44 myhost node[0000]: Thu, 24 Nov 2022 11:34:44 GMT [ERROR] [MatrixHttpClient] (REQ-613) [Error: Error during MatrixClient request POST /_matrix/client/v3/join/!noop%3Aexample.org: 404 Not Found -- {"errcode":"M_UNKNOWN","error":"Can't join remote room because no servers that are in the room have been provided."}]
Nov 24 12:34:44 myhost node[0000]: node:internal/process/promises:279
Nov 24 12:34:44 myhost node[0000]: triggerUncaughtException(err, true /* fromPromise */);
Nov 24 12:34:44 myhost node[0000]: ^
Nov 24 12:34:44 myhost node[0000]: [Error: Error during MatrixClient request POST /_matrix/client/v3/join/!noop%3Aexample.org: 404 Not Found -- {"errcode":"M_UNKNOWN","error":"Can't join remote room because no servers that are in the room have been provided."}]
Looks like it falls back to !noop:example.org
then:
Line 119 in 333c55e
A curiosity:
Looks like when you have still acceptInvitesFromGroup
in the config, it works, too.
( https://matrix.to/#/!WpbOWAblxueZXAAnjj:matrix.org/$3qSG_Oa9-lZf59cB3s2Z5lqgMd_w7A5WrPoZdgNP9n8?via=matrix.org&via=envs.net&via=element.io )