telegram icon indicating copy to clipboard operation
telegram copied to clipboard

Telegram bridge should not try to kick from rooms it is no longer in

Open turt2live opened this issue 5 years ago • 0 comments

Apr 13 23:31:40 integrations python[5875]: [2019-04-13 23:31:40,142] [[email protected]] Unhandled error while handling command logout  from @redacted
Apr 13 23:31:40 integrations python[5875]: Traceback (most recent call last):
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_appservice/intent_api.py", line 877, in ensure_joined
Apr 13 23:31:40 integrations python[5875]:     await self._join_room_direct(room_id)
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_appservice/intent_api.py", line 136, in _send
Apr 13 23:31:40 integrations python[5875]:     errcode=errcode, message=message)
Apr 13 23:31:40 integrations python[5875]: mautrix_appservice.errors.MatrixRequestError: 404: {"errcode":"M_UNKNOWN","error":"No known servers"}
Apr 13 23:31:40 integrations python[5875]: During handling of the above exception, another exception occurred:
Apr 13 23:31:40 integrations python[5875]: Traceback (most recent call last):
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/commands/handler.py", line 357, in handle
Apr 13 23:31:40 integrations python[5875]:     await handler(evt)
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/commands/handler.py", line 274, in __call__
Apr 13 23:31:40 integrations python[5875]:     return await self._handler(evt)
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/commands/telegram/auth.py", line 292, in logout
Apr 13 23:31:40 integrations python[5875]:     if await evt.sender.log_out():
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/user.py", line 245, in log_out
Apr 13 23:31:40 integrations python[5875]:     await portal.main_intent.kick(portal.mxid, self.mxid, "Logged out of Telegram.")
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_appservice/intent_api.py", line 799, in send_state_event
Apr 13 23:31:40 integrations python[5875]:     await self.ensure_joined(room_id)
Apr 13 23:31:40 integrations python[5875]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_appservice/intent_api.py", line 881, in ensure_joined
Apr 13 23:31:40 integrations python[5875]:     raise IntentError(f"Failed to join room {room_id} as {self.mxid}", e)
Apr 13 23:31:40 integrations python[5875]: mautrix_appservice.errors.IntentError: Failed to join room !ROOM_B as @telegram:t2bot.io
Apr 13 23:31:40 integrations python[5875]: [2019-04-13 23:31:40,181] [[email protected]] PUT /rooms/%21ROOM_A/send/m.room.message/487021555198300181 {"body": "Unhandled error while handling command. Check logs for more details.", "msgtype": "m.notice", "format": "org.matrix.custom.html", "formatted_body": "<p>Unhandled error while handling command. Check logs for more details.</p>\n", "m.relates_to": null} as user No identity

The command to log out came in through ROOM_A, and the bridge was trying to remove already-removed members from ROOM_B. It looks like ROOM_B had the bridge kicked from the room without first unbridging it.

turt2live avatar Apr 14 '19 00:04 turt2live