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

Invite to remote Community cannot be joined with Error 500 #7223

Closed
MacLemon opened this issue Apr 5, 2020 · 2 comments
Closed

Invite to remote Community cannot be joined with Error 500 #7223

MacLemon opened this issue Apr 5, 2020 · 2 comments
Labels
A-Workers Problems related to running Synapse in Worker Mode (or replication) z-bug (Deprecated Label)

Comments

@MacLemon
Copy link

MacLemon commented Apr 5, 2020

Description

An invitation to a community to a remote Matrix-ID cannot be followed because of an Error 500.

Steps to reproduce

As a result the invitation can neither be accepted nor refused as the same error is shown to the receiving user who now has a stuck Schroedinger's invitation in their client

federation_reader.log on the inviting instance fairydust.space

2020-04-05 15:51:01,642 - synapse.http.server - 110 - ERROR - POST-19383- Failed handle request via 'FederationGroupsAcceptInviteServlet': <SynapseRequest at 0x80816f550 method='POST' uri='/_matrix/federation/v1/groups/%2Bcabincrew%3Afairydust.space/users/%40MacLemon%3Amaclemon.at/accept_invite' clientproto='HTTP/1.1' site=8011>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/synapse/http/server.py", line 78, in wrapped_request_handler
    await h(self, request)
  File "/usr/local/lib/python3.7/site-packages/synapse/http/server.py", line 331, in _async_render
    callback_return = await callback_return
  File "/usr/local/lib/python3.7/site-packages/synapse/federation/transport/server.py", line 344, in new_func
    origin, content, request.args, *args, **kwargs
  File "/usr/local/lib/python3.7/site-packages/synapse/federation/transport/server.py", line 1032, in on_POST
    new_content = await self.handler.accept_invite(group_id, user_id, content)
AttributeError: 'GroupsServerWorkerHandler' object has no attribute 'accept_invite'

homeserver.log on the receiving instance maclemon.at:

2020-04-05 16:14:23,600 - synapse.http.matrixfederationclient - 408 - INFO - PUT-436168- {POST-O-383549} [fairydust.space] Sending request: POST matrix://fairydust.space/_matrix/federa
tion/v1/groups/%2Bcabincrew%3Afairydust.space/users/%40MacLemon%3Amaclemon.at/accept_invite; timeout 60.000000s
2020-04-05 16:14:23,601 - synapse.http.federation.matrix_federation_agent - 242 - INFO - PUT-436168- Connecting to matrix.fairydust.space:443
2020-04-05 16:14:23,659 - synapse.access.http.8008 - 302 - INFO - GET-436169- 195.176.3.20 - 8008 - {@MacLemon:maclemon.at} Processed request: 0.009sec/0.000sec (0.008sec, 0.000sec) (0
.000sec/0.001sec/1) 958B 200 "GET /_matrix/client/r0/sync?filter=4&timeout=30000&since=s1308738_56890458_10285_1747664_91935_209_116287_261794_10 HTTP/1.1" "Mozilla/5.0 (Macintosh; Int
el Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Riot/1.5.15 Chrome/78.0.3904.130 Electron/7.1.14 Safari/537.36" [0 dbevts]
2020-04-05 16:14:23,660 - synapse.http.matrixfederationclient - 442 - INFO - PUT-436168- {POST-O-383549} [fairydust.space] Got response headers: 500 Internal Server Error
2020-04-05 16:14:23,660 - synapse.http.matrixfederationclient - 526 - WARNING - PUT-436168- {POST-O-383549} [fairydust.space] Request failed: POST matrix://fairydust.space/_matrix/federation/v1/groups/%2Bcabincrew%3Afairydust.space/users/%40MacLemon%3Amaclemon.at/accept_invite: HttpResponseException("500: b'Internal Server Error'")
2020-04-05 16:14:23,661 - synapse.http.server - 81 - INFO - PUT-436168- <XForwardedForRequest at 0x81c1b8990 method='PUT' uri='/_matrix/client/r0/groups/%2Bcabincrew%3Afairydust.space/
self/accept_invite' clientproto='HTTP/1.1' site=8008> SynapseError: 500 - Internal server error
2020-04-05 16:14:23,662 - synapse.access.http.8008 - 302 - INFO - PUT-436168- 195.176.3.20 - 8008 - {@MacLemon:maclemon.at} Processed request: 0.062sec/0.000sec (0.005sec, 0.000sec) (0
.000sec/0.000sec/0) 55B 500 "PUT /_matrix/client/r0/groups/%2Bcabincrew%3Afairydust.space/self/accept_invite HTTP/1.1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.
36 (KHTML, like Gecko) Riot/1.5.15 Chrome/78.0.3904.130 Electron/7.1.14 Safari/537.36" [0 dbevts]

Expectations not met

Clicking accept on a community invitation should accept that invitation even when across federation.

Version information

  • Homeserver: Inviting: (matrix).fairydust.space
  • Homeserver: Receiving: (matrix).maclemon.at

What version of Synapse is running?

Version information applies to both instances likewise.

  • Version: 1.12.3
  • Install method: pip with python 3.7.7
  • Setup Details:
    • fairydust.space is using synchrotron and federation_reader workers
    • maclemon.at is not running worker.
  • Platform:
    • fairydust.space: Hetzner VM running FreeBSD 12.1-p3-RELEASE
    • Metal, running FreeBSD 12.1-p3-RELEASE
  • Clients:
    • Selfhosted Riot/Web: riot-web version: 1.5.15, olm version: 3.1.3 at chat.fairydust.space
    • Riot/Electron Version 1.5.15 (1.5.15) running on macOS 10.13.6 High Sierra.

Edit: Correct log file and added Setup details for instances.

@clokep
Copy link
Member

clokep commented Apr 6, 2020

This sounds like a regression from #6964. The fix might be as easy as moving accept_invite from GroupsServerHandler to GroupsServerWorkerHandler.

@clokep clokep added z-bug (Deprecated Label) communities A-Workers Problems related to running Synapse in Worker Mode (or replication) labels Apr 6, 2020
@clokep
Copy link
Member

clokep commented Apr 26, 2022

Communities/groups are being removed, see #11584.

@clokep clokep closed this as completed Apr 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Workers Problems related to running Synapse in Worker Mode (or replication) z-bug (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants