mtproto
mtproto copied to clipboard
[BUG]: Impossible to auth
Description
I've tried the auth
example with my own appID and hash
The call of client.AuthSendCode
gets stuck/blocked somehow.
When I check the error channel, I've got
decoding received data: Server response error: (code 4294966892)"
Failed snippet
https://play.golang.org/p/WCtLC1fS8hw
Expected behavior
I expect to receive a Telegram code in order to authenticate
Additional context
I run go version go1.14.3 darwin/amd64
@HT808s Thanks for feedback!
This error is REALLY strange, looks like code can converted and flipped to -404
value, but... Well, i don't know what can we do with this info...
I'll let you know if found any useful data to you
Getting the same error code, following..
We need to ask telegram developers. I digged in very deeply into the official documentation, there is not a single one description of what the -404
error means. User not found? Is the phone not registred? App not found? Nothing is clear at all. We REALLY need to send a request to the telegram developers for some kind of support, because many things are too unclear that I even get scared.
@HT808s @mwei0210 did you gus checked twice that telegram app id and app hash are valid? does examples works with tdlib credentials? Maybe this can be major problem?
yeah correct app id and hash, tested with tdlib credentials, same result...
@mwei0210 can you login into your account without 2fa password and without registration?
maybe -404 means that you need to signup with this phone number?
i guess not..
panic: Panicking because of error: sending AccountInitTakeoutSession: The key is not registered in the system (code 401)
not sure if this is related https://github.com/LonamiWebs/Telethon/issues/7
@mwei0210 try to recreate session (just delete session file, and try to reauth). After that, leave here feedback please, maybe it can help. If yes, i think that main problem in this issue is outdated session.
Also, maybe it's better to handle this error (like AUTH_KEY_UNREGISTERED
error, but i think that we just need to say user that session is corrupted). Or maybe not. But in any case, need to deal with this issue. looks too strange for me.
deleting session didn't seem to work as well
@mwei0210 ok, i'm sorry for this trouble, i'll try to contact with tg developers as fast as i can.
Nope. thanks for being helpful 😃
Did you ever figure out how to solve the issue? I'm having the exact same problem.
@aleibovici @mwei0210 @HT808s Looks like only utilities for example has bug (mtproto client created session.json
file and dry.FileExists
constantly says that session was registred.
Fixed in a3b8484 commit
Note that this bug referenced for examples only, looks like custom clients will never have this bug
@quenbyako hi, I still have the same problem with the latest commit(216789b95a5d644ebbdd1acb7eb46ff61647960a). is there any way to solve it?
@xxxsen make sure, that you've updated your go mod (in project directory type go mod tidy
). If this doesn't help, paste please somewhere (better in go playground) your code, which doesn't work 😉
Currently, without failed code, i don't know how to help you, unfortunately 😔
@quenbyako
go mod tidy
make no help
here is my code, it just copy from auth example and change auth info as myself.
https://play.golang.org/p/mH-5svHFD-R
error message I got
panic: (code 4294966892)
goroutine 14 [running]:
github.com/xelaj/mtproto.check(...)
/home/sen/go/pkg/mod/github.com/xelaj/[email protected]/utils.go:50
github.com/xelaj/mtproto.(*MTProto).startReadingResponses.func1(0xc0000e0b40, 0x790258, 0xc000288040)
/home/sen/go/pkg/mod/github.com/xelaj/[email protected]/mtproto.go:265 +0x256
created by github.com/xelaj/mtproto.(*MTProto).startReadingResponses
/home/sen/go/pkg/mod/github.com/xelaj/[email protected]/mtproto.go:246 +0x70
Process exiting with code: 2 signal: false
@xxxsen i'll dig up to this issue, and come back to you, looks pretty strange (i can't reproduce it, but it does look too realistic)
Yep, I got same problem, same mtproto ErrResponseCode 4294966892. The minor difference is the dotenv what I use to load the credentials.
github.com/xelaj/mtproto v1.0.0
I was able to resolve this by changing serverHost to my DC's IP (DC5: 91.108.56.151:443
). This makes me think if this is anyway related to DC addresses and #22 ?
solved it It's a phone number input problem. phoneNumber = "+8210xxxxxxxx" change phoneNumber = "8210xxxxxxxx"
delete +
no. Not solved.
@khjde1207 looks like it could be resolution to this issue...
@HT808s @mwei0210 @aleibovici @xxxsen @D3vl0per @ssiyad could you please confirm that this issue can be fixed by correction of input phone number? If yes, i'll add number verification before sending request, it's not too hard
Sorry, deleting the + doesn't solve it. I'm getting the error again. Debugging though. It is very difficult to find the cause.
I know the cause of the problem, but I don't know how to solve it. The session needs to be recreated after DC redirection, but I don't know how to clean it up!
I know the cause of the problem, but I don't know how to solve it. The session needs to be recreated after DC redirection, but I don't know how to clean it up!
Resolved. After replacing the DC server, you need to call InvokeWithLayer to update the server configuration
I know the cause of the problem, but I don't know how to solve it. The session needs to be recreated after DC redirection, but I don't know how to clean it up!
Resolved. After replacing the DC server, you need to call InvokeWithLayer to update the server configuration
There is a pull request with the fix?