Telegram Cli crashed with error like this "tgl/queries.c:470: tglq_query_result: Assertion `0' failed"
*** 1516297652.174790 Skipped 546 int out of 901 (type messages.Dialogs) (query type get dialogs) *** 1516297652.174834 0x00000000 0x15ba6c40 0x1cb5c415 0x0000000f telegram-cli: tgl/queries.c:470: tglq_query_result: Assertion `0' failed. SIGNAL received t/usr/local/src/tg/bin/telegram-cli(print_backtrace+0x20)[0x46edb0] /usr/local/src/tg/bin/telegram-cli(termination_signal_handler+0x64)[0x46ee34] /lib64/libc.so.6(+0x32660)[0x7f55357a3660] /lib64/libc.so.6(gsignal+0x35)[0x7f55357a35e5] /lib64/libc.so.6(abort+0x175)[0x7f55357a4dc5] /lib64/libc.so.6(+0x2b70e)[0x7f553579c70e] /lib64/libc.so.6(__assert_perror_fail+0x0)[0x7f553579c7d0] /usr/local/src/tg/bin/telegram-cli(tglq_query_result+0x47b)[0x4954ab] /usr/local/src/tg/bin/telegram-cli[0x49258e] /usr/local/src/tg/bin/telegram-cli[0x4b88bb] /usr/lib64/libevent-1.4.so.2(event_base_loop+0x3e4)[0x7f55376a7b44] /usr/local/src/tg/bin/telegram-cli(net_loop+0xbe)[0x472bde] /usr/local/src/tg/bin/telegram-cli(loop+0x1cc)[0x472e8c] /usr/local/src/tg/bin/telegram-cli(main+0x2d6)[0x470566] /lib64/libc.so.6(__libc_start_main+0xfd)[0x7f553578fd1d] /usr/local/src/tg/bin/telegram-cli[0x46eb09]
Something doesn't have enough permission
Give write permission to /.telegram-cli folder and see if it fixes
If not, try starting telegram-cli with -u root argument
With permission everthing's OK, i noticed that:
- telegram-cli user have several Supergroups
- On the other Windows machine installed telegram dekstop with same account
- If in Windows telegram client i clear history on supergroups. i see errors above. #1467
Can someone repeat this action with telegram cli and telegram desktop. action must be complete on supergroups
by the way: this account owner by that supergroups.
Take a look at this: #937
i checked issue #937. it is not my reason. because i have: (type messages.Dialogs) (query type get dialogs) telegram-cli: tgl/queries.c:470: tglq_query_result: Assertion `0' failed....
after deleting/clearing history on supergroups from windows client
I'm out of ideas then :grin:
After several months of successful usage, last week I started getting the same error:
> dialog_list
--
*** 1524696073.605593 Skipped 5712 int out of 9260 (type messages.Dialogs) (query type get dialogs)
*** 1524696073.605913 0x00000000 0x71e094f3 0x000000b0 0x1cb5c415
> telegram-cli: tgl/queries.c:470: tglq_query_result: Assertion `0' failed.
SIGNAL received
hbin/telegram-cli(print_backtrace+0x20)[0x46ed80]
bin/telegram-cli(termination_signal_handler+0x64)[0x46ee04]
/lib/x86_64-linux-gnu/libc.so.6(+0x36cb0)[0x7fb0d5b46cb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7fb0d5b46c37]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fb0d5b4a028]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fbf6)[0x7fb0d5b3fbf6]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fca2)[0x7fb0d5b3fca2]
bin/telegram-cli(tglq_query_result+0x3c0)[0x498540]
bin/telegram-cli[0x490b7a]
bin/telegram-cli[0x4b60bb]
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x754)[0x7fb0d6fbdf24]
bin/telegram-cli(net_loop+0xa6)[0x470306]
bin/telegram-cli(loop+0x187)[0x471607]
bin/telegram-cli(main+0x2e5)[0x46d5e5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fb0d5b31f45]
bin/telegram-cli[0x46d6f5]
Same with channel_list:
> channel_list
--
*** 1524695924.618029 Skipped 181 int out of 1542 (type messages.Dialogs) (query type get dialogs)
*** 1524695924.618527 0x00000000 0x15ba6c40 0x1cb5c415 0x0000000c
> telegram-cli: tgl/queries.c:470: tglq_query_result: Assertion `0' failed.
SIGNAL received
hbin/telegram-cli(print_backtrace+0x20)[0x46ed80]
bin/telegram-cli(termination_signal_handler+0x64)[0x46ee04]
/lib/x86_64-linux-gnu/libc.so.6(+0x36cb0)[0x7fd0da346cb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7fd0da346c37]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fd0da34a028]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fbf6)[0x7fd0da33fbf6]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fca2)[0x7fd0da33fca2]
bin/telegram-cli(tglq_query_result+0x3c0)[0x498540]
bin/telegram-cli[0x490b7a]
bin/telegram-cli[0x4b60bb]
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x754)[0x7fd0db7bdf24]
bin/telegram-cli(net_loop+0xa6)[0x470306]
bin/telegram-cli(loop+0x187)[0x471607]
bin/telegram-cli(main+0x2e5)[0x46d5e5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fd0da331f45]
bin/telegram-cli[0x46d6f5]
Other commands - such as get_self, msg, and resolve_username - still work correctly
I finally got a working build again, by installing linuxbrew and following the instructions for homebrew on OS X.
How to solve this?
I solved it for 3 steps:
- Delete account files on /home/user or /home/xxx if you sing in on root user dir: /root/
- Login Again with mobile number.
- Never delete chat history on Users Groups on mobile phone, with using telegram mobile client.
on /home/user, there're many directories and I am not sure what should I delete?
I mean about your linux user account. 1 home/your_user_account/.telegram-cli 2 home/telegramd 3 root/.telegram-cli
I've just deleted .telegram-cli directory and logged in again.
But I have same issue when I typed channel_list.
where are you delete it?
home/my_user_account/.telegram-cli
can you delete this folder on root also?!
I don't have root user.
and you have telegramd on /home/ directory?
there's no telegramd on /home/my_user_account directory.
in this folder you have file "auth". this file save about account information. if you find and delete it, telegram-cli must request phone number (like after first client install)
Yes, I did. and it's not working now.
Seems like tg-cli cannot handle EMPTY chats. If you CLEAR HISTORY in any client, connecting immediately with CLI will fail with this crash.
- Temporary solution: write something into empty chat
- Long-term fix: don't know, code is not straight-forward without knowing the protocol 8(
Then do try the line comment out. Also in the file tgl/queries.c the line 470.
Of course, then do make in the folder below.
Remove file: rm -f ~/.telegram-cli/state
I think this happened to me when I exceeded the disk quota and some write probably failed. It seems that you can get into this state in a number of ways, but once you're in it you have to delete /state to fix it.
I just encountered this issue two times and both were due to some pinned message in two different groups. In one the account was the owner and in the other just a member. In both times it got fixed when I get rid of the pinned message. So I concluded the pinned message was the problem, in my cases.
Looks like this (https://github.com/vysheng/tg/issues/1467) patch solves the issue. telegram-cli crashes every time when receiving "pinned message".
Same here with a Snap install on Ubuntu16.04. Solved by removing: ~/snap/telegram-cli/25/.telegram-cli/state as suggested by @vitalysennikov
No patch yet?