mautrix / discord

A Matrix-Discord puppeting bridge
https://go.mau.fi/mautrix-discord
GNU Affero General Public License v3.0
240 stars 22 forks source link

This user ID is reserved by an application service when using multiple bridge instances #143

Closed michaelphagen closed 3 months ago

michaelphagen commented 3 months ago

It seems that there is a hardcoded user id somewhere in the configuration. I've set up matrix with 1 discord bridge and it works great, but I have another discord account I'd like to bridge. When I do so, even after changing every id in the configuration, the new bridge is unable to bridge messages. Spaces and guilds can be joined with rejoin-space and guild bridge, but they are empty.

The error message on the bridge is failed to ensure registered: failed to POST /_matrix/client/v3/register: M_EXCLUSIVE (HTTP 400): This user ID is reserved by an application service.

michaelphagen commented 3 months ago

The full line from the second bridge is

2024-04-26T14:27:26Z DBG Request completed as_user_id=@discord_personal_330524346072432641:matrix.server.name duration=0.804245 method=POST req_body={"inhibit_login":true,"type":"m.login.application_service","username":"discord_personal_330524346072432641"} req_id=46 response_length=87 response_mime=application/json status_code=400 url=http://synapse:8008/_matrix/client/v3/register?user_id=%40discord_personal_330524346072432641%3Amatrix.server.name
2024-04-26T14:27:26Z ERR Failed to create portal for private channel in create handler error="failed to ensure registered: failed to POST /_matrix/client/v3/register: M_EXCLUSIVE (HTTP 400): This user ID is reserved by an application service." channel_id=875766356841218109 user_id=@michael:matrix.server.name
tulir commented 3 months ago

There are no hardcoded user IDs

If you reserved discord_.+ for one appservice, that will conflict with discord_personal_.+

michaelphagen commented 3 months ago

That's exactly what it was, my bad!

Thanks for the help.