pytgcalls / pytgcalls

Async client API for the Telegram Calls
http://pytgcalls.github.io/
GNU Lesser General Public License v3.0
301 stars 165 forks source link

Getting overflow errors on auto_start=True feature. #197

Closed annihilatorrrr closed 11 months ago

annihilatorrrr commented 11 months ago

Describe the bug Getting overflow errors since latest 1.1.0 update.

To Reproduce Steps to reproduce the behavior: Start a video call if there is No active call.

Expected behavior should start the call ?

Log


2023-12-29T16:02:21.988125374Z await assistant.join_group_call(

2023-12-29T16:02:21.988128874Z File "/opt/venv/lib/python3.12/site-packages/pytgcalls/methods/groups/join_group_call.py", line 50, in join_group_call

2023-12-29T16:02:21.988132474Z await self._app.create_group_call(

2023-12-29T16:02:21.988135774Z File "/opt/venv/lib/python3.12/site-packages/pytgcalls/mtproto/mtproto_client.py", line 86, in create_group_call

2023-12-29T16:02:21.988139274Z await self._bind_client.create_group_call(

2023-12-29T16:02:21.988142674Z File "/opt/venv/lib/python3.12/site-packages/pytgcalls/mtproto/pyrogram_client.py", line 378, in create_group_call

2023-12-29T16:02:21.988146175Z result: Updates = await self._app.send(

2023-12-29T16:02:21.988149575Z ^^^^^^^^^^^^^^^^^^^^^

2023-12-29T16:02:21.988152875Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/methods/advanced/invoke.py", line 79, in invoke

2023-12-29T16:02:21.988156375Z r = await self.session.invoke(

2023-12-29T16:02:21.988159575Z ^^^^^^^^^^^^^^^^^^^^^^^^^^

2023-12-29T16:02:21.988162775Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 389, in invoke

2023-12-29T16:02:21.988166175Z return await self.send(query, timeout=timeout)

2023-12-29T16:02:21.988169475Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023-12-29T16:02:21.988172775Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 318, in send

2023-12-29T16:02:21.988176175Z message = self.msg_factory(data)

2023-12-29T16:02:21.988179575Z ^^^^^^^^^^^^^^^^^^^^^^

2023-12-29T16:02:21.988182776Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/internals/msg_factory.py", line 37, in __call__

2023-12-29T16:02:21.988191476Z len(body)

2023-12-29T16:02:21.988194876Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/raw/core/tl_object.py", line 79, in __len__

2023-12-29T16:02:21.988198376Z return len(self.write())

2023-12-29T16:02:21.988201676Z ^^^^^^^^^^^^

2023-12-29T16:02:21.988204976Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/raw/functions/phone/create_group_call.py", line 98, in write

2023-12-29T16:02:21.988208576Z b.write(Int(self.random_id))

2023-12-29T16:02:21.988211976Z ^^^^^^^^^^^^^^^^^^^

2023-12-29T16:02:21.988215276Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/raw/core/primitives/int.py", line 33, in __new__

2023-12-29T16:02:21.988218676Z return value.to_bytes(cls.SIZE, "little", signed=signed)

2023-12-29T16:02:21.988224177Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023-12-29T16:02:21.988227577Z OverflowError: int too big to convert

2023-12-29T16:02:21.988230877Z```

**Linux (please complete the following information):**
 - OS: bookworm-slim
 - Python Version 3.12.1

**Additional context**
Earlier i never saw it.

Also i do get Telegram Error (internal error) on create calls.
Laky-64 commented 11 months ago

Fixed in py-tgcalls 1.1.2, starting from this commit 9b32f3953b76bedc2a1a10c2eea390b8bdb65a89