mtproto: [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

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 25 (10 by maintainers)

Most upvoted comments

@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/mtproto@v1.0.1-0.20210324062241-216789b95a5d/utils.go:50
github.com/xelaj/mtproto.(*MTProto).startReadingResponses.func1(0xc0000e0b40, 0x790258, 0xc000288040)
	/home/sen/go/pkg/mod/github.com/xelaj/mtproto@v1.0.1-0.20210324062241-216789b95a5d/mtproto.go:265 +0x256
created by github.com/xelaj/mtproto.(*MTProto).startReadingResponses
	/home/sen/go/pkg/mod/github.com/xelaj/mtproto@v1.0.1-0.20210324062241-216789b95a5d/mtproto.go:246 +0x70
Process exiting with code: 2 signal: false

@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

@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

Sorry, deleting the + doesn’t solve it. I’m getting the error again. Debugging though. It is very difficult to find the cause.

deleting session didn’t seem to work as well