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

impossible to delete a room #7710

Closed
Dryusdan opened this issue Jun 16, 2020 · 6 comments
Closed

impossible to delete a room #7710

Dryusdan opened this issue Jun 16, 2020 · 6 comments

Comments

@Dryusdan
Copy link

Description

I want delete some rooms. But when I try to remove it, Matrix return a 500 HTTP code :

{
    "errcode": "M_UNKNOWN",
    "error": "Internal server error"
}

And synapse log this output :

2020-06-16 18:22:42,765 - synapse.http.server - 113 - ERROR - POST-22824- Failed handle request via 'ShutdownRoomRestServlet': <XForwardedForRequest at 0x7fcda5e1b710 method='POST' uri='/_synapse/admin/v1/shutdown_room/!myamaizingroom:matrix.drycat.fr' clientproto='HTTP/1.1' site=8008>
Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    await h(self, request)
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/synapse/http/server.py", line 350, in _async_render
    callback_return = await callback_return
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/synapse/rest/admin/rooms.py", line 84, in on_POST
    ratelimit=False,
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/synapse/handlers/room.py", line 617, in create_room
    await self.event_creation_handler.assert_accepted_privacy_policy(requester)
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.7/site-packages/synapse/handlers/message.py", line 620, in assert_accepted_privacy_policy
    assert u is not None
AssertionError

I use this command :

curl 'http://127.0.0.1:8008/_synapse/admin/v1/shutdown_room/!myamaizingroom:matrix.drycat.fr' -H "Authorization: Bearer ${ACCESS_TOKEN}" -X POST -d'{"new_room_user_id": "@abuse:matrix.drycat.fr", "message": "This room has been removed from the matrix.drycat.fr homeserver due to lot of ressource consuption. Please don t use bridge with other tool. See CGU www.drycat.fr/fr/chartes/cgu", "room_name": "Room unavailable"}'

Steps to reproduce

  • Create a room
  • Send curl command into a terminal.

I have use this tool : https://github.com/matrix-org/rust-synapse-compress-state I'm not sure there's any connection because I can't remove any room process by this but a newer room can't is shutdown too.

Version information

  • Homeserver:

If not matrix.org:

  • Version:
{
    "python_version": "3.7.3",
    "server_version": "1.15.1"
}
  • Install method: package manager

  • Platform: Debian

Thank :)

@clokep
Copy link
Member

clokep commented Jun 16, 2020

It looks to me like Synapse can't find the user you're providing under new_room_user_id, does that user exist?

@dklimpel
Copy link
Contributor

Perhaps related to: #7613
I want implement some validations to this API.

@Dryusdan
Copy link
Author

The user exist yes :)

@clokep
Copy link
Member

clokep commented Jun 17, 2020

I was able to reproduce this with the following configure:

  • Enable user_consent and configure block_events_error.
  • Create an admin user.
  • Create a room.
  • Attempt to close the room, but set the new_room_user_id to an unknown user.

Are you sure the @abuse:matrix.drycat.fr user exists?

@Dryusdan
Copy link
Author

Ha heu...
Nope, it not exist. Last ban doesn't need a real user.
I create it !

@Dryusdan
Copy link
Author

My bad, sorry :x

It's work better now.
Thank :)

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

No branches or pull requests

3 participants