Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed handle request via 'RoomHierarchyRestServlet', KeyError: ('m.room.create', '') #12082

Open
matrixbot opened this issue Dec 19, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 19, 2023

This issue has been migrated from #12082.


Description

Listing all the rooms belonging to some private Space on the "Manage & explore
rooms" page fails with an "Internal Server Error" from Element web and Android.

Filtering the rooms with the panel on the left outside of this page works fine
otherwise.

Steps to reproduce

This error only seems to happen in one particular private space, but not
other ones.

  • List all the rooms in a space through "Manage & explore rooms".
  • Scroll down the list, trying to load all elements, until the error shows up.

The following error appears in loop in Synapse's logs:

synapse.http.server: [GET-1572871] Failed handle request via 'RoomHierarchyRestServlet': <XForwardedForRequest at [REDACTED] method='GET' uri='/_matrix/client/unstable/org.matrix.msc2946/rooms/![REDACTED]/hierarchy?suggested_only=false&from=[REDACTED]&limit=20' clientproto='HTTP/1.1' site='8008'>
Traceback (most recent call last):
  File "/nix/store/dv9mv0fmmhkbxczqflhcq6ifvkcvyr72-python3.9-Twisted-21.7.0/lib/python3.9/site-packages/twisted/internet/defer.py", line 1661, in _inlineCallbacks
    result = current_context.run(gen.send, result)
  File "/nix/store/rp1cyyj9sbwq8xf41d334wxhlh5i2rvl-matrix-synapse-1.52.0/lib/python3.9/site-packages/synapse/util/caches/response_cache.py", line 246, in cb
    return await callback(*args, **kwargs)
  File "/nix/store/rp1cyyj9sbwq8xf41d334wxhlh5i2rvl-matrix-synapse-1.52.0/lib/python3.9/site-packages/synapse/handlers/room_summary.py", line 396, in _get_room_hierarchy
    room_entry = await self._summarize_local_room(
  File "/nix/store/rp1cyyj9sbwq8xf41d334wxhlh5i2rvl-matrix-synapse-1.52.0/lib/python3.9/site-packages/synapse/handlers/room_summary.py", line 654, in _summarize_local_room
    room_entry = await self._build_room_entry(room_id, for_federation=bool(origin))
  File "/nix/store/rp1cyyj9sbwq8xf41d334wxhlh5i2rvl-matrix-synapse-1.52.0/lib/python3.9/site-packages/synapse/handlers/room_summary.py", line 996, in _build_room_entry
    current_state_ids[(EventTypes.Create, "")]
KeyError: ('m.room.create', '')

I previously had issues with creating some room in that space due to another
server in the federation being offline. I speculate that some room might have
been partially created and partially added to the space.

The end of that traceback seems similar to the one of #10032.

Version information

If not matrix.org:

  • Version: 1.52.0, Python 3.9.6
  • Install method: distro package
  • Platform: NixOS Linux, x86
@matrixbot matrixbot changed the title Dummy issue Failed handle request via 'RoomHierarchyRestServlet', KeyError: ('m.room.create', '') Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant