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

tg v0.19 unable to run #256704

Closed
flexwie opened this issue Sep 22, 2023 · 2 comments
Closed

tg v0.19 unable to run #256704

flexwie opened this issue Sep 22, 2023 · 2 comments

Comments

@flexwie
Copy link

flexwie commented Sep 22, 2023

Describe the bug

tg failes to run once I entered my phone number.

Might be related to paul-nameless/tg#284 but I can't verify because tdlib v1.8.3 (611bf8f ) fails to build on aarch64 (#140751 related)

Installing the same version via home-brew works without issues.

Steps To Reproduce

Steps to reproduce the behavior:

  1. install tg
  2. start and enter your phone number

Expected behavior

tg should send and ask me for a code

Additional context

Stacktrace:

Traceback (most recent call last):
  File "/nix/store/vf9g738227b655ll9llda5zyfsj48yc9-tg-0.19.0/bin/.tg-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/vf9g738227b655ll9llda5zyfsj48yc9-tg-0.19.0/lib/python3.10/site-packages/tg/__main__.py", line 69, in main
    tg.login()
  File "/nix/store/scrq869jrzdrbfh5f35m3fhmchw5cq82-python3.10-python-telegram-0.15.0/lib/python3.10/site-packages/telegram/client.py", line 583, in login
    self.authorization_state = self._wait_authorization_result(result)
  File "/nix/store/scrq869jrzdrbfh5f35m3fhmchw5cq82-python3.10-python-telegram-0.15.0/lib/python3.10/site-packages/telegram/client.py", line 513, in _wait_authorization_result
    result.wait(raise_exc=True)
  File "/nix/store/scrq869jrzdrbfh5f35m3fhmchw5cq82-python3.10-python-telegram-0.15.0/lib/python3.10/site-packages/telegram/utils.py", line 45, in wait
    raise RuntimeError(f'Telegram error: {self.error_info}')
RuntimeError: Telegram error: {'@type': 'error', 'code': 400, 'message': 'Valid api_id must be provided. Can be obtained at https://my.telegram.org', '@extra': {'request_id': 'updateAuthorizationState'}

Notify maintainers

@sikmir

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.0.0, macOS 14.0`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/Users/flexwie/.nix-defexpr/channels/nixpkgs`
@sikmir
Copy link
Member

sikmir commented Sep 22, 2023

Here is an extract from my configuration:

  nixpkgs.overlays = [
    (self: super: {
      tdlib = super.tdlib.overrideAttrs (old: {
        version = "1.8.4";
        src = super.fetchFromGitHub {
          owner = "tdlib";
          repo = "td";
          rev = "7eabd8ca60de025e45e99d4e5edd39f4ebd9467e";
          hash = "sha256-pVHaqG27KD+T+mBi7U+9dN2LzBxWZ5V2OUJK+FYEGrI=";
        };
      });
    })
  ];
  home.packages = with pkgs; [
    tg
  ];
  home.file."${config.xdg.configHome}/tg/conf.py".text = ''
    PHONE = "+123456789"
  '';

It works for me on darwin x86_64. See paul-nameless/tg#284 (comment)

@flexwie
Copy link
Author

flexwie commented Sep 22, 2023

works like a charm! thanks a lot :)

@flexwie flexwie closed this as completed Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants