fewensa / telegram-client

Rust Telegram Client
MIT License
93 stars 13 forks source link

error : TELEGRAM DATA FAIL and missing field updateGroupCall #28

Closed ehsansafari closed 3 years ago

ehsansafari commented 3 years ago

There is always this error ... ERROR [telegram_client::handler] SerdeJson(Error("missing field updateGroupCall", line: 0, column: 0)) ERROR [telegram_client::handler] TELEGRAM DATA FAIL. IF YOU SEE THIS MESSAGE, PLEASE POST AN ISSUE TO issues

fewensa commented 3 years ago

What are versions of your use?

Please use the same version, follow this document

ehsansafari commented 3 years ago

oh!, I use :

ok tanks, so i am building tdjson version 1.7.1 maybe I use TD 1.7.0, which version is more stable?

fewensa commented 3 years ago

You should be use v1.7.0, https://github.com/tdlib/td/releases/tag/v1.7.0

All 1.7.x (telegram-client/rtdlib) versions are bound to td@v1.7.0

fewensa commented 3 years ago

You can try it, if you still have problems, please reopen issue

ehsansafari commented 3 years ago

I used version 1.7.0 but it is still a problem like this:

2021-09-09 17_47_36-

2021-09-09 17_39_19-ehsan@ESI_ ~_rustBot_bot

2021-09-09 17_44_31-

fewensa commented 3 years ago

No, the version of tdjson you are using is 1.7.7

image

you can use listen update option to read this value. https://github.com/fewensa/telegram-client/blob/7dfad7c7c7e901a4117f88353dcf92fbdc717cd5/examples/client_event.rs#L63

Two suggestions

  1. Change your libtdjson dylib use 1.7.0
  2. Use telegram-client/rtdlib 0.7.x, (this version bound td master branch. but td update is very fast, there may be other problems )

Related: https://github.com/tdlib/td/issues/1419

ehsansafari commented 3 years ago

So i maked https://github.com/tdlib/td/releases/tag/v1.7.0 but it is libtdjson.so.1.7.7 rolling version of TD-tag/v1.7.0 so which TD-tag makes rolling libtdjson version 1.7.0?

fewensa commented 3 years ago

Maybe 1.7.7 will be generated when a certain step is wrong? check it and try again. I don't think it should be like this.

also, you can read this issue https://github.com/fewensa/telegram-client/issues/6

now you can get lib from this repository https://github.com/dorak88783/tdlib-builder

In my plan, there will be automatic ci to compile these dependencies in the future

fewensa commented 3 years ago
sudo apt-get -qq update > /dev/null
sudo apt-get -qq upgrade > /dev/null
sudo apt-get -qq install make git zlib1g-dev libssl-dev gperf php-cli cmake g++  > /dev/null
git clone https://github.com/tdlib/td.git
cd td
git checkout v1.7.0
rm -rf build
mkdir build

cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib ..
cmake --build . --target install
ls ../tdlib/lib/*libtdjson.so*

Try this?

Copy from https://github.com/dorak88783/tdlib-builder/blob/main/.github/workflows/build.yml Add git checkout v1.7.0

fewensa commented 3 years ago

In addition, please check how your project depends on libtdjson

ehsansafari commented 3 years ago

I maked whit git checkout v1.7.0 but 2021-09-09 22_13_05-Settings

In addition, please check how your project depends on libtdjson

I copy the fileslibtdjson.so&libtdjson.so1.7.0 to the /usr/lib/x86_64-linux-gnu/

this error https://github.com/fewensa/telegram-client/issues/28#issue-990960799 from TDLib or telegram-client , rtdlib ? I think I should read your source telegram-client, rtdlib code to find the main bugs and we will probably need to upgrade to 1.7.7 for support full

fewensa commented 3 years ago

You need to delete the data folder by your set. https://github.com/fewensa/telegram-client/blob/7dfad7c7c7e901a4117f88353dcf92fbdc717cd5/examples/client_event.rs#L75 The reason is this data write uses 1.7.7, 1.7.0 does not support 1.7.7 data. please use 1.7.0 create again.

ehsansafari commented 3 years ago

before sending the https://github.com/fewensa/telegram-client/issues/28#issuecomment-916318743, I thought I should delete the data, but I got tired of compiling the TD and did not try😂🤦‍♂️.

I tried it, so rolling 1.7.0 of the v1.7.0 tag works and has no errors Thank you so I just needed the git checkout v1.7.0 command. Now this https://github.com/fewensa/telegram-client/issues/27 remains, which I will research tomorrow