Skip to content

Room join fails with 404 M_NOT_FOUND Not found in database #111

Description

@lilioid

Describe the bug

When using the bot sdk to join a very large and very federated room, the call to POST /_matrix/client/v3/join/… fails with my homeserver returning { errcode: 'M_NOT_FOUND', error: 'Not found in database' } and status 404.
I believe this might be an error in MatrixClient.ts:1144 which sets the server_name GET parameter even though the Matrix Client-Server API Spec only describes the via GET parameter.

To Reproduce

  1. Try to join a room with a large number of federations and a large number of via servers (around 593 in my case)
  2. See error

Expected behavior
The bot should be able to join the room.

Log snippet

{@<redacted>:<redacted>} Processed request: 1.254sec/0.000sec ru=(0.018sec, 0.001sec) db=(0.005sec/0.013sec/9) 57B 404 "POST /_matrix/client/v3/join/!<redacted>?server_name=<redacted>&server_name=<redacted>&server_name=<redacted>…

Additional context
I am using Synapse as my Homeserver and am doing a client.lookupRoomAlias() before joining. The via servers are discovered as a result of this lookup and copied over to client.joinRoom().

I can see how it is an issue in itself that the room has almost 600 via servers but believe that the server_name GET parameter is incorrect regardless.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions