tg icon indicating copy to clipboard operation
tg copied to clipboard

Telegram-cli doesn´t send messages anymore.

Open Dandy-Power opened this issue 3 years ago • 41 comments

Hi,

i had installed the telegram-cli for some years on my RaspberryPi. It works since yesterday very well, without problems. Since yesterday, i can not send messages with this code:

pi@raspberrypi:~ $ telegram-cli -W -e "msg Ma_De Test 123" <----- THIS WAS WORKING WITHOUT PROBLEM! Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; type show_license' for details. Telegram-cli uses libtgl version 2.1.0 Telegram-cli includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/) I: config dir=[/home/pi/.telegram-cli]

It will open every time now the telegram console, and does not send the message, but i do not know why? when i will send in the telegram console a message like:

msg Ma_De Tes 123t

i got the error: FAIL: 38: can not parse arg #1

I have to first call contact_list and type the msg Ma_De Test 123 again, and than it will be send.

When i will add an contact to my contact list, i take this : add_contact +49123456789 Leunam Test This works witout error. But when i look again into the contact_list the new contact is not in the list, why? It shows only my two old contacts in the list.

When i will start my script via ssh it does not worky anymore, too. It opens again the telegram-cli console. and does nothing. No messages will be send.

What is going wrong since yesterday? I do not change anything. My installation was in 2016 I can read and write files on Raspberry. SD Card is 50% free.

What can i test why it is not working? Why can i not add new contacts? When i will take the msg command, is it possible it can not resolve the contact?

Hope i got help, because i do not know how i can fix the problem.

thx, regards Dandy

Dandy-Power avatar Dec 04 '21 13:12 Dandy-Power

https://github.com/vysheng/tg/issues/1733

https://github.com/vysheng/tg/issues/1732

will-code-for-pizza avatar Dec 04 '21 13:12 will-code-for-pizza

Hi,

do you mean, that the telegram-cli is outdated? Can we fix this?

Dandy-Power avatar Dec 04 '21 13:12 Dandy-Power

Same here, since 04.12.2021 fail to send any photo

juliobm avatar Dec 04 '21 15:12 juliobm

happy that I am not alone, same issue here since today. Seems so they we are now forced to use TDLib. Hope someone will create a new cli client using the TDLib.

denimjeans avatar Dec 04 '21 22:12 denimjeans

Same issue here. Started late evening 3 December. *** 1638707643.594291 Notification API_64BIT_LOGIN_APP_OUTDATED_243: You are using an outdated app that is no longer supported. To access your messages, please update your app to the latest version. *** 1638707643.607101 Incorrect phone number

AbrieW avatar Dec 05 '21 12:12 AbrieW

ok - i am not alone ;) but how we can solve this - is there a workaround available? how can i send a msg via bash script now?

twprh avatar Dec 05 '21 20:12 twprh

jfyi, I was surprised to receive a message today when a mail arrived at our outside mailbox. seems so that they changed something, it is working again, but who know how long...

denimjeans avatar Dec 06 '21 10:12 denimjeans

@twprh @denimjeans Currently we can use Telethon, it can achieve the same effect.

staoran avatar Dec 07 '21 02:12 staoran

Telethon

@twprh thank you, will give a try

denimjeans avatar Dec 07 '21 09:12 denimjeans

I am running this on a Raspberry PI and it can send message fine via bash scripts. Unfortunately the interactive action.lua automation doesn't anymore. E.g. the Pi can send me a message but I can reply back with commands via Telegram anymore. That bit is broken...

dropbrick avatar Dec 08 '21 11:12 dropbrick

I am running this on a Raspberry PI and it can send message fine via bash scripts. Unfortunately the interactive action.lua automation doesn't anymore. E.g. the Pi can send me a message but I can reply back with commands via Telegram anymore. That bit is broken...

Same here, I can send msg and photos via bash but no by script.lua

juliobm avatar Dec 08 '21 12:12 juliobm

yes basically can send but not receive messages.

dropbrick avatar Dec 08 '21 14:12 dropbrick

Could it be as simple as we need a new server pub key ?

dropbrick avatar Dec 08 '21 14:12 dropbrick

This started working again just now.

dropbrick avatar Dec 09 '21 08:12 dropbrick

This started working again just now.

What started working again? Is it fully functional again? Sending still worked manually from the cli all along. The receiving and processing of LUA script was still not working yesterday (as of 3 Dec). New activation fails with another error #1733

AbrieW avatar Dec 09 '21 10:12 AbrieW

@AbrieW Give up this ancient project as soon as possible and try Telethon.

staoran avatar Dec 09 '21 10:12 staoran

Then new login with the parameter -q.

Paulchen232 avatar Dec 09 '21 10:12 Paulchen232

This started working again just now.

What started working again? Is it fully functional again? Sending still worked manually from the cli all along. The receiving and processing of LUA script was still not working yesterday (as of 3 Dec). New activation fails with another error #1733

This now is fully functional for me as it was before. No changes made, I kept the old config folder untouched. I got a bunch of texts back from my Raspberry PI from all the interactive commands I've asked to run in the past days without success.

dropbrick avatar Dec 09 '21 13:12 dropbrick

This started working again just now.

What started working again? Is it fully functional again? Sending still worked manually from the cli all along. The receiving and processing of LUA script was still not working yesterday (as of 3 Dec). New activation fails with another error #1733

This now is fully functional for me as it was before. No changes made, I kept the old config folder untouched. I got a bunch of texts back from my Raspberry PI from all the interactive commands I've asked to run in the past days without success.

I can also now confirm that full functionality has (magically) returned. I can message the Pi, and it responds appropriately via LUA script, etc. I am, however, very concerned regarding the root cause of this issue, its probability of recurrence, and for how long we'll be in the clear. Whilst I understand that I should look at a more recent and up to date replacement of the telegram-cli, I am not a programmer or developer, and it took me many many months to get the telegram-cli to a point where I can monitor things on the farm electronically and also receive pro-active alerts. I really do not have the appetite to re-develop something that was working fine. Good luck all, let's hope it stays functional.

AbrieW avatar Dec 09 '21 17:12 AbrieW

Agreed. I'd like to know what happened to and if there's any instant message alternative to plumb an existing lua script... without too much effort,

dropbrick avatar Dec 09 '21 20:12 dropbrick

I had the same problem and it was a good time to change in favor of more modern bot https://core.telegram.org/bots @dropbrick At first glance the idea was to reuse lua scripting so i select https://github.com/wrxck/telegram-bot-lua I did realize soon that Lua was mandatory for telegram-cli scripting, but i'm more confident with other langauges. So finally i rewrite all in C using https://github.com/smartnode/telebot Thanks to @smartnode ! I figure it out how to use inline_keyboard (basically json strings) and callbacks and the result of new interactivity is totally another level.

ozlb avatar Dec 10 '21 11:12 ozlb

I wonder if I should move to something self hosted...I just spent months to build custom scripts and automation for different things and I'm afraid if it stops working is not going to be great.... maybe I need into hosting my own Rocketchat server or something...

dropbrick avatar Dec 11 '21 11:12 dropbrick

I can also now confirm that full functionality has (magically) returned. I can message the Pi, and it responds appropriately via LUA script, etc.

But the main feature for telegram-cli is we can send message by phone number, not like new one.

burkass avatar Dec 21 '21 22:12 burkass

It seems that people expect that not maintained and dead project (last commit March 2016) will work anyway...

alexander-naumov avatar Feb 05 '22 01:02 alexander-naumov

It seems that people expect that not maintained and dead project (last commit March 2016) will work anyway...

So what we have to use now to send and receive messages as user account?

vggscqq avatar Feb 10 '22 14:02 vggscqq

It seems that people expect that not maintained and dead project (last commit March 2016) will work anyway...

So what we have to use now to send and receive messages as user account?

Use the official library https://github.com/tdlib/td

https://core.telegram.org/tdlib/getting-started

ozlb avatar Feb 11 '22 21:02 ozlb

despite deprecation and everything telegram-cli still works in 2022; make sure you compiled it with openssl support; using a binary compiled a few years ago on rpi, on buster it complained about some missing libs — i just symlinked the newer versions to whatever telegram-cli was expecting (used ldd telegram-cli to see which libs it was linked against) and everything works ootb

@vggscqq: instead of using tdlib you might prefer instead https://github.com/vysheng/tdbot — a thin wrapper around tdlib that lets you pass messages as JSON or lua scripts; the repo has no docs but some of the forks have the steps to compile

a friendlier option is probably telethon, which is high level python API for telegram — it's well-maintained and has a large community

glowinthedark avatar Apr 04 '22 20:04 glowinthedark

Has this stopped working again ? I mean the interactive telegram with lua scripts

dropbrick avatar Aug 12 '22 21:08 dropbrick

Same here. I running several raspberrys on one telegram account / phone number. If I send requests via python to the local running instance of telegram-CLI it's answering fine. If I sends requests from one raspberry to another or from mobile phone to the raspberries it doesn't work.

TestWithRaspberryPi avatar Aug 14 '22 05:08 TestWithRaspberryPi

I had it ****

officialiQ00 avatar Aug 14 '22 05:08 officialiQ00