antonio-antuan / rust-tdlib

Rust client for TDlib
MIT License
57 stars 11 forks source link

get_chats(): Can't deserialize tdlib data #12

Closed ibortnik closed 2 years ago

ibortnik commented 3 years ago

Hello,

Thank you for the crate. I am getting this error when using get_chats.

let chats = client1
    .get_chats(GetChats::builder().limit(10).build())
    .await
    .unwrap();
 ERROR rust_tdlib::client::worker       > can't deserialize tdlib data: can't deserialize for updateSupergroupFullInfo with error: missing field `invite_link`
 ERROR rust_tdlib::client::worker       > can't deserialize tdlib data: can't deserialize for updateBasicGroupFullInfo with error: invalid type: map, expected a string
 ERROR rust_tdlib::client::worker       > can't deserialize tdlib data: can't deserialize for updateSupergroupFullInfo with error: invalid type: map, expected a string
antonio-antuan commented 3 years ago

What's the version of your tdlib library?

пн, 19 июл. 2021 г., 22:15 ibortnik @.***>:

Hello,

Thank you for the crate. I am getting this error when using get_chats.

let chats = client1 .get_chats(GetChats::builder().limit(10).build()) .await .unwrap();

ERROR rust_tdlib::client::worker > can't deserialize tdlib data: can't deserialize for updateSupergroupFullInfo with error: missing field invite_link ERROR rust_tdlib::client::worker > can't deserialize tdlib data: can't deserialize for updateBasicGroupFullInfo with error: invalid type: map, expected a string ERROR rust_tdlib::client::worker > can't deserialize tdlib data: can't deserialize for updateSupergroupFullInfo with error: invalid type: map, expected a string

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aCLr/rust-tdlib/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRBAYEXALOXBMUNUWP4A7TTYR2VJANCNFSM5AUJZBQA .

ibortnik commented 3 years ago

1.7.0

antonio-antuan commented 3 years ago

Hm, that's weird because GetChats returns just list of ids... Could you try this:

client
        .get_chats(
            GetChats::builder()
                .limit(10)
                .offset_order(9223372036854775807)
                .build(),
        )
        .await.unwrap();
antonio-antuan commented 3 years ago

Also, you can set RUST_LOG=trace and provide me log file... But beware, there can be private data

antonio-antuan commented 3 years ago

And yes, you can grep that logs by updateSupergroupFullInfo and provide just matched rows

ibortnik commented 3 years ago

Thanks! Using offset_order(i64::MAX) worked.

What is the problem?

antonio-antuan commented 3 years ago

Well, I don't even know :D I just tried to reproduce the same error and found that if offset_order not set - response not returned and code become blocked. I need to dive into two problems: deserialize error and blocked get_chats request. Consider not to close issue for now and get to check it in several days.

antonio-antuan commented 2 years ago

Good news everyone. Year has not passed and the issue is resolved with #14.