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

mautrix-discord cannot relay messages #3328

Open
matrixbot opened this issue Nov 2, 2024 · 13 comments
Open

mautrix-discord cannot relay messages #3328

matrixbot opened this issue Nov 2, 2024 · 13 comments

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @Elara6331 at matrix-org/dendrite#3328.

Background information

  • Dendrite version or git SHA: 0.13.6+e9deb52
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: Yes
  • go version: N/A
  • Client used (if applicable): Element

Description

  • What is the problem: The mautrix-discord bridge fails to relay messages from discord to my matrix homeserver. Dendrite is returning HTTP 500.
  • Who is affected: Users of the bridge on my homeserver
  • How is this bug manifesting: Dendrite returns Internal Server Error. The following error message appears in mautrix-discord logs:
    ERR Failed to send part of message to Matrix error="failed to ensure joined: failed to POST /_matrix/client/v3/rooms/!Sk5rRcx0XrZ87BkT:genzedong.xyz/join: HTTP 500" action="discord message create" attachment_id= author_id=<redacted> channel_id=<redacted> channel_receiver= message_id=<redacted> message_type=0 part_index=0 room_id=!Sk5rRcx0XrZ87BkT:genzedong.xyz
    
    Dendrite doesn't log any errors, it only logs the following message:
    level=info msg="User requested to room join" room_id="!Sk5rRcx0XrZ87BkT:genzedong.xyz" servers="[]" user_id="@discord_<redacted>:genzedong.xyz"
    
  • When did this first appear: After setting up the bridge

Steps to reproduce

  • Set up mautrix-discord bridge
  • Try sending message on the Discord side

Additional Information

#2696 had a similar issue

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @Elara6331 at matrix-org/dendrite#3328 (comment).

I believe the internal server error is coming from here:

https://github.com/matrix-org/dendrite/blob/67d68768574a234b733eb3e4061644fc098a69f6/clientapi/routing/joinroom.go#L121-L125

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @Elara6331 at matrix-org/dendrite#3328 (comment).

Actually, looking closer, it looks like there is an error message from dendrite, it was just written to stderr instead of stdout:

level=error msg="Failed to join room" error="M_FORBIDDEN: You are not joined to any matching rooms." room_id="!Sk5rRcx0XrZ87BkT:genzedong.xyz" servers="[]" user_id="@discord_<redacted>:genzedong.xyz"

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @regalialong at matrix-org/dendrite#3328 (comment).

Just noticed this issue, stumbled onto this myself on a fresh e9deb52 instance. Works on Synapse so might be worth looking into since there seems to be different behavior between the two.

For me, direct messages seemingly bridged fine while guilds failed.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @niebloomj at matrix-org/dendrite#3328 (comment).

Are you sure this isn't an issue with the bridge?

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @regalialong at matrix-org/dendrite#3328 (comment).

Not sure but my install of Synapse handles it fine, so I don't believe the bridge is outright broken.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @alnmy at matrix-org/dendrite#3328 (comment).

Having same issue and I noticed that DMs work aswell but not guilds. Freshly made Dendrite instance.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @alnmy at matrix-org/dendrite#3328 (comment).

It works if I manually invite the bridged users into the room.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @Pyro57000 at matrix-org/dendrite#3328 (comment).

Gonna echo this above seeing the same thing on dendrite, gonna try to set up synapse instead and see if that works better.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @pathwayx99 at matrix-org/dendrite#3328 (comment).

Another echo here. Same error messages, same behavior. Direct messages work fine, guilds do not. I can send messages, which appear on the channel (checking using Discord client) but any replies are not received.

Should say I'm running instagram, messenger and whatsapp bridges without issues.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @fbievan at matrix-org/dendrite#3328 (comment).

This does not seem to be a dendrite issue... From my short research...

If you are affected try setting your power level in a room to 50, then go and edit the room, look at "room access", then change that public, then back to private... This is due to the fact that for some reason is set to space members only, I think an issue upstream is in order.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @fbievan at matrix-org/dendrite#3328 (comment).

Changing the option 'restricted_rooms' in mautrix-discord does this automatically, so change that to false in mautrix-discord bypaases the issue.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @fbievan at matrix-org/dendrite#3328 (comment).

I am not sure what exactly causes the not itself to not be in the space, as that option would have to do.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @fbievan at matrix-org/dendrite#3328 (comment).

Changing the option 'restricted_rooms' in mautrix-discord does this automatically, so change that to false in mautrix-discord bypaases the issue.

You just have to make sure to unbridge all rooms, and then recreate them

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

No branches or pull requests

1 participant