Skip to content

ERROR: The phone number is invalid (caused by SendCodeRequest) [Docker method] #275

@phere-x

Description

@phere-x

Installation method: docker run

Command being used:

docker run -v /file_dir/:/files/ \
  -v ~/config/:/config \ 
  -it nekmo/telegram-upload:master   \
  upload  "/file_dir/my_file.mp4"

I entered my api_id & api_hash correctly and it proceeds without error. When it comes to the phone number step it throws out the error shown below.

I tried using 3 different formats for my phone number, +44{my_number}, 44{my_number}, 0{my_number} and it gives the same error each time.

I'm guessing it's due to some parts being outdated, as the last update to this project was in August 2023.

Traceback output:

Traceback (most recent call last):
  File "/app/telegram_upload/management.py", line 151, in <module>
    sys.exit(fn())
  File "/app/telegram_upload/exceptions.py", line 64, in wrap
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/app/telegram_upload/management.py", line 91, in upload
    client.start()
  File "/app/telegram_upload/client.py", line 105, in start
    return super().start(phone=phone, password=password, bot_token=bot_token, force_sms=force_sms,
  File "/usr/local/lib/python3.9/site-packages/telethon/client/auth.py", line 133, in start
    else self.loop.run_until_complete(coro)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/site-packages/telethon/client/auth.py", line 189, in _start
    await self.send_code_request(phone, force_sms=force_sms)
  File "/usr/local/lib/python3.9/site-packages/telethon/client/auth.py", line 514, in send_code_request
    result = await self(functions.auth.SendCodeRequest(
  File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 79, in _call
    result = await future
telethon.errors.rpcbaseerrors.AuthKeyError: RPCError 406: UPDATE_APP_TO_LOGIN (caused by SendCodeRequest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions