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

Double puppeting error creating Matrix room upon joining Telegram group #440

Closed
stfnnklv opened this issue Mar 10, 2020 · 2 comments
Closed
Labels
duplicate This issue has already been reported

Comments

@stfnnklv
Copy link

Hi,

I discovered the following issue. With double puppeting enabled, when I am invited in a new Telegram group (via Telegram), that room didn't appeared in Matrix, until I sent /sync to the bot.
Found this in the logs:

For the actual room creation in Telegram:

[2020-03-10 10:34:42,118] [[email protected].@snikolov:<redacted>] Handling action MessageActionChatCreate(title='<redacted>', users=[<redcated>]) to <redacted> by <redacted>
[2020-03-10 10:34:42,119] [[email protected]] Fatal error creating Matrix room
Traceback (most recent call last):
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/metadata.py", line 244, in create_matrix_room
    return await self._create_matrix_room(user, entity, invites)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/metadata.py", line 259, in _create_matrix_room
    entity = await self.get_entity(user)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/base.py", line 237, in get_entity
    return await user.client.get_entity(self.peer)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/client/users.py", line 284, in get_entity
    functions.messages.GetChatsRequest(chats))).chats
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/client/users.py", line 53, in __call__
    future = self._sender.send(request, ordered=ordered)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/network/mtprotosender.py", line 172, in send
    state = RequestState(request, self._loop)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/network/requeststate.py", line 17, in __init__
    self.data = bytes(request)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/tl/functions/messages.py", line 1141, in __bytes__
    b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(struct.pack('<i', x) for x in self.id),
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/tl/functions/messages.py", line 1141, in <genexpr>
    b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(struct.pack('<i', x) for x in self.id),
struct.error: required argument is not an integer

For every incoming message afterwards:

[2020-03-10 10:34:47,981] [[email protected]] Fatal error creating Matrix room
Traceback (most recent call last):
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/metadata.py", line 244, in create_matrix_room
    return await self._create_matrix_room(user, entity, invites)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/metadata.py", line 259, in _create_matrix_room
    entity = await self.get_entity(user)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/base.py", line 237, in get_entity
    return await user.client.get_entity(self.peer)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/client/users.py", line 284, in get_entity
    functions.messages.GetChatsRequest(chats))).chats
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/client/users.py", line 53, in __call__
    future = self._sender.send(request, ordered=ordered)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/network/mtprotosender.py", line 172, in send
    state = RequestState(request, self._loop)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/network/requeststate.py", line 17, in __init__
    self.data = bytes(request)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/tl/functions/messages.py", line 1141, in __bytes__
    b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(struct.pack('<i', x) for x in self.id),
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/telethon/tl/functions/messages.py", line 1141, in <genexpr>
    b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(struct.pack('<i', x) for x in self.id),
struct.error: required argument is not an integer
[2020-03-10 10:34:47,982] [[email protected]] Sending <redacted> to None by @telegram_<redacted>:<redacted>
[2020-03-10 10:34:47,982] [[email protected].@snikolov:<redacted>] Failed to handle Telegram update UpdateShortChatMessage(id=164377, from_id=<redacted>, chat_id=<redacted>, message='<redacted>', pts=271690, pts_count=1, date=datetime.datetime(2020, 3, 10, 8, 34, 47, tzinfo=datetime.timezone.utc), out=False, mentioned=False, media_unread=False, silent=False, fwd_from=None, via_bot_id=None, reply_to_msg_id=None, entities=[])
Traceback (most recent call last):
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/abstract_user.py", line 194, in _update_catch
    await self._update(update)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/abstract_user.py", line 241, in _update
    await self.update_message(update)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/abstract_user.py", line 441, in update_message
    return await portal.handle_telegram_message(self, sender, update)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/telegram.py", line 445, in handle_telegram_message
    event_id = await self.handle_telegram_text(source, intent, is_bot, evt)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix_telegram/portal/telegram.py", line 227, in handle_telegram_text
    await intent.set_typing(self.mxid, is_typing=False)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 250, in set_typing
    await self.ensure_joined(room_id)
  File "/opt/mautrix-telegram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 352, in ensure_joined
    raise ValueError("Room ID not given")
ValueError: Room ID not given

After running /sync the logs didn't say much actually - just a normal room creation.

Kind regards,
Stefan

@BjWe
Copy link

BjWe commented Apr 9, 2020

See here: #443

@tulir
Copy link
Member

tulir commented May 20, 2020

This seems to have been a duplicate of #443, which is now fixed

@tulir tulir closed this as completed May 20, 2020
@tulir tulir added the duplicate This issue has already been reported label May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue has already been reported
Development

No branches or pull requests

3 participants