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

Can't invite user from server that disabled profile lookup over federation #29028

Open
AndrewFerr opened this issue Jan 20, 2025 · 1 comment
Labels
A-Error-Message A-Invite O-Uncommon Most users are unlikely to come across this or unexpected workflow T-Defect

Comments

@AndrewFerr
Copy link
Member

Steps to reproduce

  1. On a target Synapse homeserver, configure allow_profile_lookup_over_federation to false
  2. Use Element Web with a user on another homeserver, and invite a user on the configured Synapse homeserver to a room (either via /invite <mxid> or an "Invite to this room" button)

Outcome

What did you expect?

The user should be invited, despite their profile being unavailable at the time of invitation.

What happened instead?

The invite fails, and a dialog appears with a title of "Failed to invite" and a body of "Unknown server error". Network logs show a 502 response to GET <homeserver-url>/_matrix/client/v3/profile/<mxid-of-invitee>, with a payload of {"errcode": "M_UNKNOWN", "error": "Failed to fetch profile"}.

Reconfiguring the Synapse homeserver with allow_profile_lookup_over_federation: true allows the invite to work. So it must be that Element Web treats profile availability as a prerequisite to invitation. This was not always the case, as I used to be able to make such invitations.

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

1.11.89

Homeserver

No response

Will you send logs?

No

@dosubot dosubot bot added A-Error-Message A-Invite O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Jan 20, 2025
@Half-Shot
Copy link
Member

The issue is to do with MultiInviter

Essentially, most profile errors will bubble up as a failure in here and I suspect the M_UNKNOWN is breaking things.

Ideally I think Synapse should respond with something like M_PROFILE_NOT_FOUND which would permit Element to retry.

You should find that the promptBeforeInviteUnknownUsers setting (a.k.a "Prompt before sending invites to potentially invalid matrix IDs") should make Element ignore the profile entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Error-Message A-Invite O-Uncommon Most users are unlikely to come across this or unexpected workflow T-Defect
Projects
None yet
Development

No branches or pull requests

2 participants