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

launch stalls with 'Valid api_|id must be provided #19

Open
plum opened this issue Feb 28, 2023 · 40 comments
Open

launch stalls with 'Valid api_|id must be provided #19

plum opened this issue Feb 28, 2023 · 40 comments
Labels
fixed i think sdjkhjkfhewkjh

Comments

@plum
Copy link

plum commented Feb 28, 2023

Ho, looks really good, but this error occurs, implyiing app_id authentication.

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'}}

Arigram was installed from aur community package , V. 0.1.6-1

I dont have an app_id myself , although i have a telegram account of course. I had expected the ap_id would be registered somehwhere in the installe d package.

My telephone number, as entered on the command after arigram, has been recorded in the arigram/config.py

Any help, appreciated.
John

@TruncatedDinoSour
Copy link
Owner

im sorry to hear that

to clearify, i half abandoned this project and i barely work on it
anymore these days and i dont maintain the aur package so i dont know whats going on

the app_id is already pre-packaged into the client https://github.com/TruncatedDinosour/arigram/blob/main/arigram/config.py#L25..L26 so im very confused why such error would happen, maybe you overwrote it somehow, maybe even in config.py ?

maybe some other arigram users know, but i even now currently have arigram open and its fine,
very concerned why its broken for you :/ if anything lmk :)

@ghost
Copy link

ghost commented Mar 6, 2023

I have this error. Changed API_ID and API_HASH to mine, recompiled. Same error. Probably, something changed in telegram api idk. Not a python dev so can't really check

@TruncatedDinoSour
Copy link
Owner

I have this error. Changed API_ID and API_HASH to mine, recompiled. Same error. Probably, something changed in telegram api idk. Not a python dev so can't really check

thats odd, weirdly still works for me and i doubt its anything with the api as i try to keep up with the changes, if it was gonna happen itd happen to me too

@TruncatedDinoSour
Copy link
Owner

maybe the AUR package is broken or something ? i dont maintain it though

@ghost
Copy link

ghost commented Mar 6, 2023

I installed from sources.

My OS:

Distributor ID:	Elementary
Description:	elementary OS 6.1 Jólnir
Release:	6.1
Codename:	jolnir

@TruncatedDinoSour
Copy link
Owner

I installed from sources.

My OS:

Distributor ID:	Elementary
Description:	elementary OS 6.1 Jólnir
Release:	6.1
Codename:	jolnir

maybe this fixes it ? i bumped the python tg version
https://github.com/TruncatedDinosour/arigram/releases/tag/v0.1.7

@bogdanbryzh
Copy link

I installed from sources.

My OS:

Distributor ID:	Elementary
Description:	elementary OS 6.1 Jólnir
Release:	6.1
Codename:	jolnir

maybe this fixes it ? i bumped the python tg version
https://github.com/TruncatedDinosour/arigram/releases/tag/v0.1.7

I'll try in a moment. Will notify

@TruncatedDinoSour TruncatedDinoSour self-assigned this Mar 6, 2023
@TruncatedDinoSour
Copy link
Owner

just in case, ill leave the house for now as i got plans with my best friend, ill be back in a couple of hours, sorry for the delay in responses in advance, id give 24/7 support if i could, but im just a teenage developer, not a large tech company <33

@bogdanbryzh
Copy link

dude, relax, you don't owe me or anybody else anything.
have a great one 🫡

@bogdanbryzh
Copy link

bogdanbryzh commented Mar 6, 2023

unfortunately, error persists

Screenshot from 2023-03-06 16-41-43
Screenshot from 2023-03-06 16-42-04

@bogdanbryzh
Copy link

tried creating fresh user on system - same

@TruncatedDinoSour
Copy link
Owner

unfortunately, error persists

Screenshot from 2023-03-06 16-41-43 Screenshot from 2023-03-06 16-42-04

this is so odd, ill try and research it

@TruncatedDinoSour
Copy link
Owner

mpv-shot0002

this is with ~/.config/arigram and ~/.cache/arigram removed, it all works, im so lost, why am i unable to reacreate the error

@bogdanbryzh
Copy link

wait, I didn't try purging cache. will be back in a sec

@bogdanbryzh
Copy link

well, apparently I don't have cache for arigram

@TruncatedDinoSour
Copy link
Owner

well, apparently I don't have cache for arigram

i guess its because you havent even been able to log in

@bogdanbryzh
Copy link

I will try installing arigram on virtual machine. Hope it'll work

@TruncatedDinoSour
Copy link
Owner

its still very suspicious that it even breaks on 2 systems

@TruncatedDinoSour
Copy link
Owner

I will try installing arigram on virtual machine. Hope it'll work

ill try it on a fresh void linux vm too

@TruncatedDinoSour
Copy link
Owner

mpv-shot0001
this is a fully fresh void linux vm, still works, so lost still, looking up the error isnt much helpful either

@plum
Copy link
Author

plum commented Mar 6, 2023

@ truncatedDinosaur
I did grab the app ID from package files and entered them into my local conf, but the error persists.

@TruncatedDinoSour
Copy link
Owner

@ truncatedDinosaur I did grab the app ID from package files and entered them into my local conf, but the error persists.

yeah, i know, its probably not related to that, the problem in it is that i am unable to reproduce it no matter what, im unsure whats so broken that makes your arigram install scream

@ghost
Copy link

ghost commented Mar 7, 2023

installed on fresh Ubuntu 22.04. Had an issue with libssl.so.1.1
Screenshot from 2023-03-07 16-44-06
resolved thanks to https://stackoverflow.com/a/73604364

@ghost
Copy link

ghost commented Mar 7, 2023

but now arigram works just fine

@TruncatedDinoSour
Copy link
Owner

but now arigram works just fine

hm, but now why is it broken for you two

@plum
Copy link
Author

plum commented Mar 8, 2023

@bogdan:
OK, that's useful I'll check out the lib.ssl.so issue in some way or another.
I dimly recall I have had issues with libssl.so in the past with some other applications, and managed to resolve it, but without a fresh install of my system.

@TruncatedDinoSour
Copy link
Owner

@bogdan: OK, that's useful I'll check out the lib.ssl.so issue in some way or another. I dimly recall I have had issues with libssl.so in the past with some other applications, and managed to resolve it, but without a fresh install of my system.

so, any update ?

@TruncatedDinoSour TruncatedDinoSour added the fixed i think sdjkhjkfhewkjh label Mar 12, 2023
@r-scheffler
Copy link

hey, got the same issue after a fresh arch install.

@TruncatedDinoSour
Copy link
Owner

hey, got the same issue after a fresh arch install.

hihi, we still dont know what the cause is, if you figure it out, please tell us <3

@plum
Copy link
Author

plum commented Mar 20, 2023

On arch I see there are two lib32-openssl packages: perhaps that is the cause of the problem

$ pacman -Ss openssl


multilib/lib32-openssl 1:3.0.8-1 [installed]
    The Open Source toolkit for Secure Sockets Layer and Transport Layer Security (32-bit)
multilib/lib32-openssl-1.1 1.1.1.t-1
    The Open Source toolkit for Secure Sockets Layer and Transport Layer Security

These provide the lib.ssl.so file.
As you can see, I'm on the later version, and reported the problem as an issue. I could try swapping the round and testing, OR meanwhile, you could let me know, which version you are running.

@TruncatedDinoSour
Copy link
Owner

On arch I see there are two lib32-openssl packages: perhaps that is the cause of the problem

$ pacman -Ss openssl


multilib/lib32-openssl 1:3.0.8-1 [installed]
    The Open Source toolkit for Secure Sockets Layer and Transport Layer Security (32-bit)
multilib/lib32-openssl-1.1 1.1.1.t-1
    The Open Source toolkit for Secure Sockets Layer and Transport Layer Security

These provide the lib.ssl.so file. As you can see, I'm on the later version, and reported the problem as an issue. I could try swapping the round and testing, OR meanwhile, you could let me know, which version you are running.

i use openssl version 1.1.1, gentoos latest

@bogdanbryzh
Copy link

interestingly enough it works on EndevourOS just fine. No python errors, no openssl errors, nothing.

@TruncatedDinoSour
Copy link
Owner

interestingly enough it works on EndevourOS just fine. No python errors, no openssl errors, nothing.

yeah, its unreproducable on my gentoo, nor on a void vm, nothing, idk whats up, no clue what to fix

@plum
Copy link
Author

plum commented Mar 26, 2023

Form what's been reported so far I think we can conclude the key is valid and it should be read with OK with required dependencies. Therefore, It seems like it could be down to the aur package. It is actively maintained and Imyself coul dnot see any obvious problems there, when taking a breif look: Here are the details;

[aur arigram.git](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=arigram :)
root/pckbuild:

 Maintainer: Onur BÜBER <onurbuber@engineer.com>
# Developer: Ari Archer <ari.web.xyz@gmail.com>

pkgname=arigram
pkgver=0.1.6
pkgrel=1
pkgdesc='A fork of tg -- a hackable telegram TUI client'
arch=('x86_64')
url='https://github.com/TruncatedDinosour/arigram.git'
license=('Unlicense')
provides=('arigram')
conflicts=('arigram')
optdepends=('ffmpeg'
	    	'nnn'
	    	'fzf'
	    	'ranger')
makedepends=('python'
		     'python-pip'
		     'python-telegram'
	     	 'python-pyfzf'
	     	 'python-pyperclip'
         	 'bash'
	     	 'git')
source=("$pkgname-$pkgver.tar.gz::https://github.com/TruncatedDinosour/arigram/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('f3319df1990805c977b3759a67228793dc67f78ed9c21f9098ffade0095d35f0')

build() {
    cd "$srcdir/$pkgname-$pkgver"
    python setup.py build

}

package() {
    cd "$srcdir/$pkgname-$pkgver"
    python setup.py install --root="$pkgdir"
    install -Dm644 UNLICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

It's pulling arigram version 0.1.6.1

$ pacman -Qi arigram

Name            : arigram
Version         : 0.1.6-1
Description     : A fork of tg -- a hackable telegram TUI client
Architecture    : x86_64
URL             : https://github.com/TruncatedDinosour/arigram.git


I've just now posted this issue to the package maintainer for his comments on this problem experienced by only arch users.

@TruncatedDinoSour
Copy link
Owner

im guessing the issue is solved so ill close it, thank you for active convo when needed

@Yehoward
Copy link

Yehoward commented Oct 26, 2023

Not solved, yet. I have the problem both from built version and from AUR. What's even weirder is that I didn't have the problem from the start. It ran "fine", the only serious error being that I couldn't type. I solved it (in controllers.py at the line 582 changed the permission can_send_message to can_send_basic_message), and it worked fine for a bit, then it gave me a 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'}}. I tried a different API id, and still doesn't work.

Even though in my case it may seem as an user error, I highly doubt it.

@TruncatedDinoSour
Copy link
Owner

Not solved, yet. I have the problem both from built version and from AUR. What's even weirder is that I didn't have the problem from the start. It ran "fine", the only serious error being that I couldn't type. I solved it (in controllers.py at the line 582 changed the permission can_send_message to can_send_basic_message), and it worked fine for a bit, then it gave me a 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'}}. I tried a different API id, and still doesn't work.

Even though in my case it may seem as an user error, I highly doubt it.

sorry, ion rlly work on this anymore, the current state of this project is 'if it works for me its good enough for everyone' and what id suggest is forking this, i am sorry for the accumulating errors and functionality loss over time, ill reopen this just in case the community wants to solve this or yall wanna advertise any forks

@Yehoward
Copy link

Not solved, yet. I have the problem both from built version and from AUR. What's even weirder is that I didn't have the problem from the start. It ran "fine", the only serious error being that I couldn't type. I solved it (in controllers.py at the line 582 changed the permission can_send_message to can_send_basic_message), and it worked fine for a bit, then it gave me a 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'}}. I tried a different API id, and still doesn't work.
Even though in my case it may seem as an user error, I highly doubt it.

sorry, ion rlly work on this anymore, the current state of this project is 'if it works for me its good enough for everyone' and what id suggest is forking this, i am sorry for the accumulating errors and functionality loss over time, ill reopen this just in case the community wants to solve this or yall wanna advertise any forks

Yes, I understand. I'll try to fix it, and if I succeed I'll let you know.

@Yehoward
Copy link

Yehoward commented Oct 27, 2023

I found the error, and it was a user one. I was using python-telegram 0.17.0 which doesn't support the latest version of TDLib. I updated python-telegram to 0.18.0 and everything works.

What's even weirder is that I didn't have the problem from the start. It ran "fine", the only serious error being that I couldn't type.

I bet that was caused by the fact that I had two python-telegram packages installed, one from AUR with the latest version and one from pip.
You may want to change the python-telegram version in pyproject.toml to "^0.18.0".

@TruncatedDinoSour
Copy link
Owner

hey, as this issue is still open i'd like to make it clear that this project has had its final release and i encourage to go find or start other arigram forks

https://github.com/TruncatedDinoSour/arigram/releases/tag/v0.1.8
https://github.com/TruncatedDinoSour/arigram/forks
https://github.com/TruncatedDinoSour/arigram/#featured-forks

@TruncatedDinoSour TruncatedDinoSour removed their assignment Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed i think sdjkhjkfhewkjh
Projects
None yet
Development

No branches or pull requests

5 participants