Skip to content

Signed out of my account on all my devices #74

@StanleyMXY

Description

@StanleyMXY

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.zip and 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

  1. pip install -U hydrogram
  2. Create hello.py script with code example
  3. Replace the placeholder api_id and api_hash values with my own.
  4. Run script with "python hello.py"
  5. Log in to my account
  6. Login successfully and send message to myself
  7. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions