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

Docker image can't login (2FA) #274

Open
fastchain opened this issue Apr 30, 2022 · 0 comments
Open

Docker image can't login (2FA) #274

fastchain opened this issue Apr 30, 2022 · 0 comments

Comments

@fastchain
Copy link

fastchain commented Apr 30, 2022

Hi, here is the log

#docker run -it --rm ghcr.io/paul-nameless/tg

Unable to find image 'ghcr.io/paul-nameless/tg:latest' locally
latest: Pulling from paul-nameless/tg
f7ec5a41d630: Pull complete 
388aab6f3954: Pull complete 
9501c65d3a7f: Pull complete 
ac4bddc73958: Pull complete 
808bc56a0001: Pull complete 
6067e1f2162c: Pull complete 
aca9e1ac12cf: Pull complete 
71dff49d1c32: Pull complete 
fe396968d843: Pull complete 
dd4d325108fe: Pull complete 
Digest: sha256:ce198732d7f15bebf6da74d217bf75c54466a48072fc22e72e68231c923c6d41
Status: Downloaded newer image for ghcr.io/paul-nameless/tg:latest
Enter your phone number in international format (including country code)
phone> [my phone]
find: ‘/root/.cache/tg/files’: No such file or directory
Enter code:30745
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/app/tg/__main__.py", line 78, in <module>
    main()
  File "/app/tg/__main__.py", line 69, in main
    tg.login()
  File "/usr/local/lib/python3.9/site-packages/telegram/client.py", line 574, in login
    self.authorization_state = self._wait_authorization_result(result)
  File "/usr/local/lib/python3.9/site-packages/telegram/client.py", line 504, in _wait_authorization_result
    result.wait(raise_exc=True)
  File "/usr/local/lib/python3.9/site-packages/telegram/utils.py", line 45, in wait
    raise RuntimeError(f'Telegram error: {self.error_info}')
RuntimeError: Telegram error: {'@type': 'error', 'code': 406, 'message': 'UPDATE_APP_TO_LOGIN', '@extra': {'request_id': 'updateAuthorizationState'}}

2FA is enabled.

@fastchain fastchain changed the title Docker image can't login Docker image can't login (2FA) Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant