This repository was archived by the owner on Nov 25, 2024. It is now read-only.
This repository was archived by the owner on Nov 25, 2024. It is now read-only.
mautrix-discord fails to relay messages with dendrite #2696
Closed
Description
Background information
- Dendrite version or git SHA: 0.9.5
- Monolith or Polylith?: monolith
- SQLite3 or Postgres?: postgres 13.7
- Running in Docker?: yes, docker 20.10.5+dfsg1, kubernetes 1.23.6
go version
: as shipped in official docker images- Client used (if applicable): Element/Linux 1.11.3 on debian
Description
- What is the problem: mautrix-discord appservice does not relay messages from discord
- Who is affected: Me, as the admin and only user on my homeserver
- How is this bug manifesting: dendrite logs say
time="2022-09-07T04:57:01.446203771Z" level=error msg="Failed to join room" error="r.Queryer.QueryRestrictedJoinAllowed: helpers.IsInvitePending: missing NID for user \"@discord_200047045262704640:locationd.net\" (map[])" room_id="!Q3UXWb44A9A2bR7N:locationd.net" servers="[]" user_id="@discord_200047045262704640:locationd.net"
- When did this first appear: I've started using dendrite with 0.9.4, and mautrix-discord master as of commit 92c5407359e18500d3090cbca460781e86c88726 from August 20, 2022
Steps to reproduce
- install dendrite 0.9.5 (using docker image
matrixdotorg/dendrite-monolith:v0.9.5
) - install mautrix-discord (using docker image
dock.mau.dev/mautrix/discord:92c5407359e18500d3090cbca460781e86c88726-amd64
) - copy
registration.yaml
from mautrix-discord to dendrite data directory and add toapp_service_api.config_files
- using Element client, start conversation with
@discordbot:<domain>
- say
login
and scan QR code using discord mobile app to authenticate - say
login-matrix <access-token>
to enable double-puppeting - say
guilds bridge <guild-id>
to bridge a guild - wait for rooms to be created as messages come in
At this point rooms should start showing messages as received from discord, but rooms stay empty.
Excerpts from dendrite logs (filtering to messages about specific proxy user mautrix-discord created):
time="2022-09-07T04:57:01.222367605Z" level=info msg="Processing registration request" auth.type="" req.id=xezhG0QOWHbp req.method=POST req.path=/_matrix/client/v3/register session_id="" username=discord_200047045262704640
time="2022-09-07T04:57:01.419596968Z" level=info msg="Uploading file" ContentType=image/png FileSizeBytes=23366 Origin=locationd.net UploadName="" req.id=zV24CZ5ea5vZ req.method=POST req.path=/_matrix/media/v3/upload user_id="@discord_200047045262704640:locationd.net"
time="2022-09-07T04:57:01.422008197Z" level=info msg="File uploaded" Base64Hash=MLJliBF86fp3nTdT5nAbhbmytemtdh4-ypwRNoNdHIA ContentType=image/png FileSizeBytes=23366 Origin=locationd.net UploadName="" media_id=c4c925a120e48a769711d7a480518434aca082f6059c7ba518dd77aa10626159 req.id=zV24CZ5ea5vZ req.method=POST req.path=/_matrix/media/v3/upload user_id="@discord_200047045262704640:locationd.net"
time="2022-09-07T04:57:01.430298458Z" level=info msg="Generated thumbnail" ActualHeight=32 ActualWidth=32 Height=32 Origin=locationd.net ResizeMethod=crop Width=32 media_id=c4c925a120e48a769711d7a480518434aca082f6059c7ba518dd77aa10626159 processTime=1.386355ms req.id=zV24CZ5ea5vZ req.method=POST req.path=/_matrix/media/v3/upload user_id="@discord_200047045262704640:locationd.net"
time="2022-09-07T04:57:01.432871760Z" level=info msg="Signalling other goroutines waiting for this goroutine to generate the thumbnail." Height=32 Origin=locationd.net ResizeMethod=crop Width=32 media_id=c4c925a120e48a769711d7a480518434aca082f6059c7ba518dd77aa10626159 req.id=zV24CZ5ea5vZ req.method=POST req.path=/_matrix/media/v3/upload user_id="@discord_200047045262704640:locationd.net"
time="2022-09-07T04:57:01.437245104Z" level=info msg="Generated thumbnail" ActualHeight=96 ActualWidth=96 Height=96 Origin=locationd.net ResizeMethod=crop Width=96 media_id=c4c925a120e48a769711d7a480518434aca082f6059c7ba518dd77aa10626159 processTime=3.416638ms req.id=zV24CZ5ea5vZ req.method=POST req.path=/_matrix/media/v3/upload user_id="@discord_200047045262704640:locationd.net"
time="2022-09-07T04:57:01.438568193Z" level=info msg="User requested to room join" room_id="!Q3UXWb44A9A2bR7N:locationd.net" servers="[]" user_id="@discord_200047045262704640:locationd.net"
time="2022-09-07T04:57:01.439663790Z" level=info msg="Signalling other goroutines waiting for this goroutine to generate the thumbnail." Height=96 Origin=locationd.net ResizeMethod=crop Width=96 media_id=c4c925a120e48a769711d7a480518434aca082f6059c7ba518dd77aa10626159 req.id=zV24CZ5ea5vZ req.method=POST req.path=/_matrix/media/v3/upload user_id="@discord_200047045262704640:locationd.net"
time="2022-09-07T04:57:01.446203771Z" level=error msg="Failed to join room" error="r.Queryer.QueryRestrictedJoinAllowed: helpers.IsInvitePending: missing NID for user \"@discord_200047045262704640:locationd.net\" (map[])" room_id="!Q3UXWb44A9A2bR7N:locationd.net" servers="[]" user_id="@discord_200047045262704640:locationd.net"
Excerpts from mautrix-discord logs:
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #155: POST https://matrix.locationd.net/_matrix/client/v3/register?user_id=%40discord_200047045262704640%3Alocationd.net {"username":"discord_200047045262704640","inhibit_login":true,"type":"m.login.application_service"}
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #155 (/v3/register) completed in 4.486375ms with status 200 and 85 bytes of application/json body
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #156: GET https://matrix.locationd.net/_matrix/client/v3/profile/@discord_200047045262704640:locationd.net/displayname?user_id=%40discord_200047045262704640%3Alocationd.net
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #156 (/v3/profile/@discord_200047045262704640:locationd.net/displayname) completed in 617.298µs with status 200 and 44 bytes of application/json body
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #157: PUT https://matrix.locationd.net/_matrix/client/v3/profile/@discord_200047045262704640:locationd.net/displayname?user_id=%40discord_200047045262704640%3Alocationd.net {"displayname":"rubix#7669"}
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #157 (/v3/profile/@discord_200047045262704640:locationd.net/displayname) completed in 2.109004ms with status 200 and 2 bytes of application/json body
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #158: POST https://matrix.locationd.net/_matrix/media/v3/upload?user_id=%40discord_200047045262704640%3Alocationd.net <23366 bytes>
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #158 (/_matrix/media/v3/upload) completed in 6.867654ms with status 200 and 102 bytes of application/json body
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #159: GET https://matrix.locationd.net/_matrix/client/v3/profile/@discord_200047045262704640:locationd.net/avatar_url?user_id=%40discord_200047045262704640%3Alocationd.net
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #159 (/v3/profile/@discord_200047045262704640:locationd.net/avatar_url) completed in 1.626063ms with status 200 and 17 bytes of application/json body
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #160: PUT https://matrix.locationd.net/_matrix/client/v3/profile/@discord_200047045262704640:locationd.net/avatar_url?user_id=%40discord_200047045262704640%3Alocationd.net {"avatar_url":"mxc://locationd.net/c4c925a120e48a769711d7a480518434aca082f6059c7ba518dd77aa10626159"}
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #160 (/v3/profile/@discord_200047045262704640:locationd.net/avatar_url) completed in 4.403364ms with status 200 and 2 bytes of application/json body
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #161: POST https://matrix.locationd.net/_matrix/client/v3/rooms/%21Q3UXWb44A9A2bR7N:locationd.net/join?user_id=%40discord_200047045262704640%3Alocationd.net <default empty object>
�[0m[Sep 7, 2022 04:57:01] [Matrix/@discord_200047045262704640:locationd.net/DEBUG] req #161 (/v3/rooms/!Q3UXWb44A9A2bR7N:locationd.net/join) completed in 10.833817ms with status 500 and 155 bytes of application/json body
�[33m[Sep 7, 2022 04:57:01] [Portal/397426163649216512/WARN] Failed to send message 1016935096227483731 to matrix: failed to ensure joined: failed to POST /_matrix/client/v3/rooms/!Q3UXWb44A9A2bR7N:locationd.net/join: 500 Internal Server Error�[0m