botgram / shell-bot

:robot: Telegram bot that executes commands and sends the live output
GNU General Public License v3.0
797 stars 488 forks source link

Invalid token was entered, please try again. #67

Open ReverseSage opened 11 months ago

ReverseSage commented 11 months ago

Hello dears,

The bot crashes at the point I run node server the bot asks me to enter the bot api token and when I do it shows the bellow error

NetworkError: getMe failed: Error: read ECONNRESET
    at new NetworkError (/root/shell-bot/node_modules/botgram/lib/bot.js:20:20)
    at ClientRequest.handleResponse (/root/shell-bot/node_modules/botgram/lib/bot.js:133:24)
    at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:427:9)
    at TLSSocket.emit (events.js:314:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
When calling method getMe: {}
    at Bot.callMethod (/root/shell-bot/node_modules/botgram/lib/bot.js:102:18)
    at Bot.autodetect (/root/shell-bot/node_modules/botgram/lib/bot.js:164:8)
    at Bot.firstDetection (/root/shell-bot/node_modules/botgram/lib/bot.js:179:17)
    at processTicksAndRejections (internal/process/task_queues.js:79:11) {
  err: [Error],
  req: [Error]
}

Please find below a screenshot of the error image

I tried to search the error as it seems to be a problem with ssl or connecting to https/443 so I tried connection manually with curl

curl -v http://api.telegram.org/bot-token/getMe
*   Trying 149.154.167.220:80...
* Connected to api.telegram.org (149.154.167.220) port 80 (#0)
> GET /bot-token/getMe HTTP/1.1
> Host: api.telegram.org
> User-Agent: curl/7.81.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

Please any help?