mautrix / slack

A Matrix-Slack puppeting bridge
GNU Affero General Public License v3.0
61 stars 17 forks source link

[dendrite] slackbot leaving the chat instantly #41

Closed cyberb closed 7 months ago

cyberb commented 7 months ago

I am testing slack bridge with dendrite and it takes a lot of attempts to start the chat with slackbot as bot is constantly leaving the chat right after I send "help" or anything.

logs:

Nov 29 14:26:33 syncloud nginx[28103]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:33 +0000] "POST /_matrix/client/r0/keys/query HTTP/1.1" 200 134 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:33 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:33.917136351Z" level=info msg="Creating new room" req.id=LHPTvB8v5JxH req.method=POST req.path=/_matrix/client/r0/createRoom roomID="!6tivynKADmyCUXJA:matrix.myserver" roomVersion=10 userID="@boris:matrix.myserver" user_id="@boris:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.007757814Z" level=debug msg="Responding to sync after wake-up" currentPos=s145335_6_352893_1430_145305_145333_185336_484802_0 device_id=4mPZH3hy limit=20 req.id=0AVF2NLiPwSR req.method=GET req.path=/_matrix/client/r0/sync since=s145317_6_352893_1430_145305_145333_185336_484802_0 timeout=30s user_id="@boris:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.007824568Z" level=debug msg="Responding to sync after wake-up" currentPos=s145335_6_352893_1430_145305_145333_185336_484802_0 device_id=gZTiugbp limit=50 req.id=6KUANZ64nFMJ req.method=GET req.path=/_matrix/client/r0/sync since=s145317_6_352893_1430_145305_145333_185336_484802_0 timeout=30s user_id="@boris:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.025223523Z" level=debug msg="Applied history visibility (sync)" after=2 before=2 duration=6.496064ms room_id="!6tivynKADmyCUXJA:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.054506885Z" level=debug msg="Applied history visibility (sync)" after=2 before=2 duration=9.909195ms room_id="!6tivynKADmyCUXJA:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.153104008Z" level=debug msg="processing invite event" event_id="" invitee="@slackbot:matrix.myserver" inviter="@boris:matrix.myserver" origin_local=true req.id=LHPTvB8v5JxH req.method=POST req.path=/_matrix/client/r0/createRoom room_id="!6tivynKADmyCUXJA:matrix.myserver" room_version=10 target_local=true user_id="@boris:matrix.myserver"
Nov 29 14:26:34 syncloud nginx[28102]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s145317_6_352893_1430_145305_145333_185336_484802_0 HTTP/1.1" 200 1068 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.179094196Z" level=debug msg="Responding to sync immediately" currentPos=s145339_6_352893_1430_145305_145333_185336_484802_0 device_id=gZTiugbp limit=50 req.id=5nWVHHJiukMm req.method=GET req.path=/_matrix/client/r0/sync since=s145335_6_352893_1430_145305_145333_185336_484802_0 timeout=30s user_id="@boris:matrix.myserver"
Nov 29 14:26:34 syncloud nginx[28104]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "GET /_matrix/client/r0/profile/%40boris%3Amatrix.myserver HTTP/1.1" 200 134 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.195220575Z" level=debug msg="Applied history visibility (sync)" after=4 before=4 duration=7.364815ms room_id="!6tivynKADmyCUXJA:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.197467802Z" level=debug msg="Appservice worker sending 1 events(s) from roomserver" appservice=slack
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Starting handling of transaction content={"pdu":1} transaction_id=1701267994196112625
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Finished dispatching events from transaction transaction_id=1701267994196112625
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.204505219Z" level=info msg="User requested to room join" room_id="!6tivynKADmyCUXJA:matrix.myserver" servers="[]" user_id="@slackbot:matrix.myserver"
Nov 29 14:26:34 syncloud nginx[28104]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "POST /_matrix/client/r0/createRoom HTTP/1.1" 200 56 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.215856643Z" level=debug msg="Responding to sync immediately" currentPos=s145339_6_352893_1430_145340_145333_185336_484802_0 device_id=4mPZH3hy limit=20 req.id=oyd2jUMoAKhK req.method=GET req.path=/_matrix/client/r0/sync since=s145335_6_352893_1430_145305_145333_185336_484802_0 timeout=30s user_id="@boris:matrix.myserver"
Nov 29 14:26:34 syncloud nginx[28102]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "POST /_matrix/client/r0/keys/query HTTP/1.1" 200 4612 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud nginx[28103]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "PUT /_matrix/client/r0/user/%40boris%3Amatrix.myserver/account_data/m.direct HTTP/1.1" 200 2 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.234981167Z" level=debug msg="Received data from client API server" room_id="" type=m.direct
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.252859169Z" level=debug msg="Responding to sync immediately" currentPos=s145341_6_352893_1430_145340_145343_185336_484805_0 device_id=gZTiugbp limit=50 req.id=eYcx6oE4EcAb req.method=GET req.path=/_matrix/client/r0/sync since=s145339_6_352893_1430_145340_145333_185336_484803_0 timeout=30s user_id="@boris:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.256565455Z" level=debug msg="Applied history visibility (sync)" after=4 before=4 duration=7.469894ms room_id="!6tivynKADmyCUXJA:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.265451725Z" level=debug msg="Appservice worker sending 1 events(s) from roomserver" appservice=slack
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Starting handling of transaction content={"pdu":1} transaction_id=1701267994264261783
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.268893014Z" level=info msg="User joined room successfully" room_id="!6tivynKADmyCUXJA:matrix.myserver" servers="[]" user_id="@slackbot:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Request completed as_user_id=@slackbot:matrix.myserver duration=66.156591 method=POST req_body={} req_id=48 response_length=56 response_mime=application/json status_code=200 url=http://unix/_matrix/client/v3/rooms/%216tivynKADmyCUXJA:matrix.myserver/join?user_id=%40slackbot%3Amatrix.myserver
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Finished dispatching events from transaction transaction_id=1701267994264261783
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Request completed as_user_id=@slackbot:matrix.myserver duration=4.829436 method=GET req_id=49 response_length=182 response_mime=application/json status_code=200 url=http://unix/_matrix/client/v3/rooms/%216tivynKADmyCUXJA:matrix.myserver/joined_members?user_id=%40slackbot%3Amatrix.myserver
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Leaving empty room after accepting invite room_id=!6tivynKADmyCUXJA:matrix.myserver sender=@boris:matrix.myserver target=@slackbot:matrix.myserver
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.285923001Z" level=info msg="User requested to leave join" room_id="!6tivynKADmyCUXJA:matrix.myserver" user_id="@slackbot:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.289113714Z" level=debug msg="Applied history visibility (sync)" after=1 before=1 duration=2.686086ms room_id="!6tivynKADmyCUXJA:matrix.myserver"
Nov 29 14:26:34 syncloud nginx[28102]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s145335_6_352893_1430_145305_145333_185336_484802_0 HTTP/1.1" 200 5662 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud nginx[28104]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "PUT /_matrix/client/r0/user/%40boris%3Amatrix.myserver/account_data/im.vector.setting.breadcrumbs HTTP/1.1" 200 2 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.311257860Z" level=debug msg="Received data from client API server" room_id="" type=im.vector.setting.breadcrumbs
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.317263623Z" level=debug msg="Received data from client API server" room_id="!6tivynKADmyCUXJA:matrix.myserver" type=m.fully_read
Nov 29 14:26:34 syncloud nginx[28101]: syncloud nginx: 1.2.3.4 - - [29/Nov/2023:14:26:34 +0000] "POST /_matrix/client/r0/rooms/!6tivynKADmyCUXJA%3Amatrix.myserver/read_markers HTTP/1.1" 200 2 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.321394315Z" level=debug msg="Appservice worker sending 1 events(s) from roomserver" appservice=slack
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Starting handling of transaction content={"pdu":1} transaction_id=1701267994320429758
Nov 29 14:26:34 syncloud matrix.matrix[7764]: time="2023-11-29T14:26:34.325141155Z" level=info msg="User left room successfully" room_id="!6tivynKADmyCUXJA:matrix.myserver" user_id="@slackbot:matrix.myserver"
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Request completed as_user_id=@slackbot:matrix.myserver duration=40.11183 method=POST req_body={} req_id=50 response_length=2 response_mime=application/json status_code=200 url=http://unix/_matrix/client/v3/rooms/%216tivynKADmyCUXJA:matrix.myserver/leave?user_id=%40slackbot%3Amatrix.myserver
Nov 29 14:26:34 syncloud matrix.slack[8005]: 2023-11-29T14:26:34Z DBG Finished dispatching events from transaction transaction_id=1701267994320429758
cyberb commented 7 months ago

cannot even invite to a public room

tulir commented 7 months ago

Using dendrite isn't recommended (https://docs.mau.fi/bridges/general/registering-appservices.html#dendrite)

cyberb commented 7 months ago

N.B. Dendrite is not a supported environment, as it often has serious bugs. It is strongly recommended to use Synapse or Conduit instead.

@tulir ok, are you saying even conduit (rust) considered a better option than dendrite (go) ? I am not sure I want Synapse (python) on my weak device.

tulir commented 7 months ago

Yes, conduit generally works fine

cyberb commented 7 months ago

ok, another thing as my telegram (python) and signal (python) work perfectly fine while whatsapp (go) and slack (go) have this issue, I think it has something to do with matrix-go lib. I will test with conduit and let you know.

cyberb commented 7 months ago

good news, this seems to have fixed all my go bridge bot invite issues: https://github.com/matrix-org/dendrite/pull/3078