-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Checklist
- I am sure the error is coming from Hydrogram's code and not elsewhere
- I have searched in the issue tracker for similar bug reports, including closed ones
- I ran
pip3 install -U https://github.com/hydrogram/hydrogram/archive/dev.zipand reproduced the issue using the latest development version
Description
I ran the demo code and it logged out all my devices from my phone, computer and telethon session.
I used "pip install -U hydrogram"
I can logged in successfully but after a while(eg 30-60 seconds), it would logged me out from all devices.
I checked the active device info of hydrogram, it was "agentsales(my app name), hydrogram 0.2.0, CPython 3.12, Android(platform I chose for my app), windows server". This seems to have many contradictions; could this be the reason for the failure?
Steps to reproduce
- pip install -U hydrogram
- Create hello.py script with code example
- Replace the placeholder api_id and api_hash values with my own.
- Run script with "python hello.py"
- Log in to my account
- Login successfully and send message to myself
- Be logged out from all my devices and session is invalid
Code example
import asyncio
from hydrogram import Client
api_id = 12345
api_hash = "0123456789abcdef0123456789abcdef"
async def main():
async with Client("my_account", api_id, api_hash) as app:
await app.send_message('me', 'Greetings from Hydrogram!')
me = await app.get_me()
print(f"Successfully logged in as {me.first_name} ({me.id})")
asyncio.run(main())Logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels