synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Broken rooms are created

Open RomanOlegovich opened this issue 3 years ago • 4 comments

Description

On our server, chats are administered automatically (backend):

  • users are created through the admin API
  • further all actions are performed on behalf of users using the token obtained from /_synapse/admin/v1/users/{user_id}/login

Steps to reproduce

Randomly reproduced.

Create room

  • Log in as user A and create direct room and receive room id (invite user B). "/_matrix/client/v3/createRoom"
  • Log in as user B, join the room by room id
You do not have permission to join the room. A meaningful `errcode`
and description error text will be returned. Example reasons for rejection are:
- The room is invite-only and the user was not invited.
- The user has been banned from the room.
- The room is restricted and the user failed to satisfy any of the conditions.

Try get room details

  • Convert alias (known) to roomId "/_matrix/client/v3/directory/room/{roomAlias}" Get a room by roomId (Will be joined_members = 0, canonical_alias = null) "/_synapse/admin/v1/rooms/{room_id}"
{
  "room_id": "!FlLYKuBJcyYAuwDeIN:autostatus",
  "name": null,
  "canonical_alias": null,
  "joined_members": 0,
  "joined_local_members": 0,
  "version": "9",
  "creator": "@4nt7betogyadycbogtx7be6oweadycbogyade:autostatus",
  "encryption": null,
  "federatable": false,
  "public": "false",
  "join_rules": null,
  "guest_access": null,
  "history_visibility": null,
  "state_events": 1,
  "HasError": false,
  "ErrorCode": null,
  "Error": null
}
  • When searching for an alias, it does not find "/_synapse/admin/v1/rooms?search_term={alias}"
{"rooms":[],"offset":0,"total_rooms":0,"HasError":false,"ErrorCode":null,"Error":null}
  • When trying to create a room with such an alias, the error "Room alias already taken"
{"HasError":true,"Errcode":"M_ROOM_IN_USE","Error":"Room alias already taken","Retry_after_ms":null}

Homeserver

homeserver

Synapse Version

{"server_version":"1.63.1","python_version":"3.9.13"}

Installation Method

Docker (matrixdotorg/synapse)

Platform

container in swarm

Relevant log output

-

Anything else that would be useful to know?

No response

RomanOlegovich avatar Jul 28 '22 02:07 RomanOlegovich

Hi, can you share the relevant logs showing these steps please? It sounds like it ought to work fine.

Do you have any plugin modules that might be affecting who is allowed to join a room?

erikjohnston avatar Jul 29 '22 10:07 erikjohnston

I'll try to get the logs. I don't think it should work like that. If I create a small number of rooms - everything works fine. Problems start if you send a lot of requests (about 3000) in parallel or one by one. May be connected https://github.com/matrix-org/synapse/issues/13427

RomanOlegovich avatar Aug 01 '22 02:08 RomanOlegovich

I think reason of this issue described here and here

RomanOlegovich avatar Aug 08 '22 01:08 RomanOlegovich

It's pretty impossible to say what is going on without the relevant logs, if you can provide logs that cover the steps to reproduce, we can get a better sense of what is happening and diagnose the issue, including whether it is a duplicate of the issues you mentioned.

H-Shay avatar Aug 09 '22 22:08 H-Shay

I am closing this now as we are unable to investigate this due to a lack of information. If more information becomes available in the future we can re-open it.

H-Shay avatar Sep 20 '22 21:09 H-Shay

@H-Shay hi, can't share logs but I known this is issue is connected to https://github.com/matrix-org/synapse/issues/13427

RomanOlegovich avatar Oct 04 '22 05:10 RomanOlegovich

duplicate of #8895

squahtx avatar Oct 04 '22 15:10 squahtx