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

mautrix-discord cannot relay messages #3328

Open
Elara6331 opened this issue Feb 16, 2024 · 13 comments
Open

mautrix-discord cannot relay messages #3328

Elara6331 opened this issue Feb 16, 2024 · 13 comments

Comments

@Elara6331
Copy link

Elara6331 commented Feb 16, 2024

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

@Elara6331
Copy link
Author

I believe the internal server error is coming from here:

default:
response = util.JSONResponse{
Code: http.StatusInternalServerError,
JSON: spec.InternalServerError{},
}

@Elara6331
Copy link
Author

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"

@regalialong
Copy link

regalialong commented Feb 17, 2024

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.

@niebloomj
Copy link

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

@regalialong
Copy link

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

@alnmy
Copy link

alnmy commented Mar 24, 2024

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

@alnmy
Copy link

alnmy commented Mar 24, 2024

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

@Pyro57000
Copy link

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

@pathwayx99
Copy link

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.

@fbievan
Copy link

fbievan commented Oct 3, 2024

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.

@fbievan
Copy link

fbievan commented Oct 3, 2024

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

@fbievan
Copy link

fbievan commented Oct 3, 2024

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

@fbievan
Copy link

fbievan commented Oct 3, 2024

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants