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

Panic when try to UploadSaveBigFilePart #50

Closed
blez opened this issue Dec 17, 2020 · 4 comments
Closed

Panic when try to UploadSaveBigFilePart #50

blez opened this issue Dec 17, 2020 · 4 comments
Labels
fixed already this issue is already fixed in latest versions good first issue Good for newcomers

Comments

@blez
Copy link

blez commented Dec 17, 2020

When I do

_, err := client.UploadSaveBigFilePart(&telegram.UploadSaveBigFilePartParams{
	FileId:         somefileid,
	FilePart:       filepart,
	FileTotalParts: total,
	Bytes:          filepartBypes,
})

I always got an error

panic: constructorID '0x997275b5' not found [recovered]
	panic: constructorID '0x997275b5' not found

goroutine 6 [running]:
github.com/xelaj/mtproto.(*MTProto).recoverGoroutine(0xc0002fe000)
	/home/paval/go/pkg/mod/github.com/xelaj/[email protected]/mtproto_utils.go:77 +0x125
panic(0xb7d960, 0xc0002a0180)
	/usr/local/go/src/runtime/panic.go:969 +0x175
github.com/xelaj/mtproto/serialize.(*Decoder).PopObj(0xc0002a0100, 0x5fdbbf3000ed7490, 0xc0002a0120)
	/home/paval/go/pkg/mod/github.com/xelaj/[email protected]/serialize/decoder.go:169 +0x23a
github.com/xelaj/mtproto/serialize.(*RpcResult).DecodeFrom(0xc0002a0120, 0xc0002a0100)
	/home/paval/go/pkg/mod/github.com/xelaj/[email protected]/serialize/common_types.go:279 +0x46
github.com/xelaj/mtproto.(*MTProto).processResponse(0xc0002fe000, 0x5fdbbf3059fc5801, 0x7, 0xe238e0, 0xc0002e6000, 0xc0002e6000, 0x0)
	/home/paval/go/pkg/mod/github.com/xelaj/[email protected]/mtproto.go:303 +0xbe5
github.com/xelaj/mtproto.(*MTProto).startReadingResponses.func1(0xc0002fe000, 0xe25120, 0xc0002ea180)
	/home/paval/go/pkg/mod/github.com/xelaj/[email protected]/mtproto.go:277 +0x296
created by github.com/xelaj/mtproto.(*MTProto).startReadingResponses
	/home/paval/go/pkg/mod/github.com/xelaj/[email protected]/mtproto.go:253 +0x70
exit status 2
@quenbyako
Copy link
Member

Hey @blez!

Could you please test your code on this branch? You can switch it in two ways, if you using go mod, add commit hash (@6582c6e), if not, you can just checkout branch manualy:

cd $GOPATH/src/github.com/xelaj/mtproto
git fetch github new_decoder_refactoring
git checkout new_decoder_refactoring

If this wont help, ping me, i'll look more deep in this bug.

Reason is that in tl schema boolan is an object, like struct, class or sort of, but in go boolean is fixed std type, so that's why decoder panicing.

@quenbyako quenbyako added bug Something isn't working good first issue Good for newcomers need investigation Further information is requested labels Dec 17, 2020
@blez
Copy link
Author

blez commented Dec 18, 2020

I have already tried it.

go get -u github.com/xelaj/mtproto@new_decoder_refactoring

Did not work

@blez
Copy link
Author

blez commented Dec 18, 2020

Sorry, my previous comment was false alert. With https://github.com/xelaj/mtproto/tree/new_decoder_refactoring branch I do not have same error.

But still does not work. I've created another issue
#51

@quenbyako
Copy link
Member

@blez glad to hear this!

Also, go get must called as go get -u github.com/xelaj/mtproto@6582c6e, cause (i'm not kiddin, that's too stupid) go mod doesn't support branches, only commit hashes ¯_(ツ)_/¯

@quenbyako quenbyako added fixed already this issue is already fixed in latest versions and removed bug Something isn't working need investigation Further information is requested labels Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed already this issue is already fixed in latest versions good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants