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

Codegen: UNEXPECTEDLY, some Rpc responses are not objects! (see desc) #19

Closed
quenbyako opened this issue Oct 10, 2020 · 3 comments · Fixed by #45
Closed

Codegen: UNEXPECTEDLY, some Rpc responses are not objects! (see desc) #19

quenbyako opened this issue Oct 10, 2020 · 3 comments · Fixed by #45
Labels
bug Something isn't working help wanted Extra attention is needed need investigation Further information is requested

Comments

@quenbyako
Copy link
Member

quenbyako commented Oct 10, 2020

СукаБлять!

Alright, so some messages like contacts.getSaved response as vector<someType> (which is actually slices). in MTProto vector is LIKELY object (it has 4 bytes for len and bytes stream of wrapped objects).

I changed already decoder of this shit, but we need to fix codegen. Now in MTProto object we have two different request types:

MTProto.MakeRequest(TL) — for REAL objects
MTProto.MakeRequestAsSlice(TL, as reflect.Type) — for responses which is vectors. as need for decoder, it's trying to understand, which type of slice do you need

@quenbyako quenbyako changed the title Codegen: UNEXPECTEDLY, some Rpc responses ar not objects! (see desc) Codegen: UNEXPECTEDLY, some Rpc responses are not objects! (see desc) Oct 10, 2020
@quenbyako quenbyako added bug Something isn't working help wanted Extra attention is needed need investigation Further information is requested labels Oct 10, 2020
@quenbyako quenbyako added this to TODO in telegram codegen Oct 25, 2020
@quenbyako quenbyako added this to To do in Main board Oct 25, 2020
@quenbyako quenbyako moved this from To do to In progress in Main board Nov 4, 2020
@quenbyako quenbyako moved this from TODO to Working on it in telegram codegen Nov 4, 2020
@quenbyako
Copy link
Member Author

partially, it's fixed. see #37 for fixes of this bug in codegen tool

@shadowspore
Copy link
Contributor

@ololosha228 #37 does not fix that issue (well, it can, but MakeRequestAsSlice is a crap, and I found a better way how to fix it).
I think this issue might be re-opened for a while (new big PR is coming 😱).

@quenbyako quenbyako reopened this Nov 8, 2020
@quenbyako
Copy link
Member Author

@zweihander got it

I dont like this solution too, bu i didn't find a way how to make requests without breaking current requesting system. Maybe, if you know how to make it, it's all on you)

@quenbyako quenbyako linked a pull request Nov 28, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed need investigation Further information is requested
Projects
Main board
  
In progress
telegram codegen
Working on it
Development

Successfully merging a pull request may close this issue.

2 participants