vysheng / tg

telegram-cli
GNU General Public License v2.0
6.47k stars 1.53k forks source link

Telegram-cli doesn´t send messages anymore. #1734

Open Dandy-Power opened 2 years ago

Dandy-Power commented 2 years ago

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; typeshow_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

will-code-for-pizza commented 2 years ago

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

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

Dandy-Power commented 2 years ago

Hi,

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

juliobm commented 2 years ago

Same here, since 04.12.2021 fail to send any photo

denimjeans commented 2 years ago

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.

AbrieW commented 2 years ago

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

twprh commented 2 years ago

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?

denimjeans commented 2 years ago

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...

staoran commented 2 years ago

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

denimjeans commented 2 years ago

Telethon

@twprh thank you, will give a try

dropbrick commented 2 years ago

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...

juliobm commented 2 years ago

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

dropbrick commented 2 years ago

yes basically can send but not receive messages.

dropbrick commented 2 years ago

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

dropbrick commented 2 years ago

This started working again just now.

AbrieW commented 2 years ago

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

staoran commented 2 years ago

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

Paulchen232 commented 2 years ago

Then new login with the parameter -q.

dropbrick commented 2 years ago

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.

AbrieW commented 2 years ago

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.

dropbrick commented 2 years ago

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,

ozlb commented 2 years ago

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.

dropbrick commented 2 years ago

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...

burkass commented 2 years ago

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.

alexander-naumov commented 2 years ago

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

vggscqq commented 2 years ago

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?

ozlb commented 2 years ago

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

glowinthedark commented 2 years ago

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

dropbrick commented 2 years ago

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

TestWithRaspberryPi commented 2 years ago

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.

officialiQ00 commented 2 years ago

I had it ****

Paulchen232 commented 2 years ago

Workaround: If you want your self anything send to control the Raspbeery Pi than use a Channel. (msg.out = true)

javiplx commented 2 years ago

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 and everything works ootb

Might you be unsing an old telegram-cli install @glowinthedark ? I'm trying it right now and says

*** 1661274560.333397 Notification API_64BIT_LOGIN_APP_OUTDATED_260: You are using an outdated app that is no longer supported. To access your messages, please update your app to the latest version. If you don’t know how to update your app, go to https://telegram.org/dl

which is the error I traced up to this issue

glowinthedark commented 2 years ago

@javiplx:

Yes, I am using an old telegram-cli:

> version
Telegram-cli version 1.4.1 (uses tgl version 2.1.0)
uses libopenssl for encryption

The user can be referenced either by screen name (eg msg somename hello) or by user id (eg msg user#123456789 hello). You can also send to a chat.

dropbrick commented 2 years ago

Does anyone have ready to use instructions on how to move the chat automation using action.lua to a channel instead ?

Paulchen232 commented 2 years ago

@dropbrick you only need make a channel with you as member. If you then send a code to the channel you get a answer from telegram-cli (msg.from.print_name) to the channel.

Paulchen232 commented 2 years ago

@dropbrick Make the channel in android with the App is very easy. With "code" I mean things witch in lua programmed.

dropbrick commented 2 years ago

Ok I've added the PI to a private channel. I can see now receiving messages now from the channel(called Pi) but it's not answering. I even removed all my lua stuff and kept the basic ping/pong answers.... what could be the issue to I need to use some other lua function because it's a channel now ?

Screenshot 2022-08-29 at 07 14 58 Screenshot 2022-08-29 at 07 14 35
dropbrick commented 2 years ago

My mistake! I made the Pi a subscriber so it couldn't send messages, it's now an admin and I can see its replies!

image
bertysoft commented 2 years ago

Dear, my telegram cli working fine till 2 hours ago. I can sent msg but not receive nothing. I working with telegram from 2016... Somebody can help me.

ozlb commented 9 months ago

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.

Telegram bot api via curl is so simple...

jkhack46 commented 9 months ago

07:43, 5 января 2024 г., glowinthedark @.***>: @ozlb: is it a real token in your gist?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***> I don’t remember what token the question is about?  what was the matter?!  remind please.-- Send my telephone