Code Monkey home page Code Monkey logo

Comments (7)

koalazak avatar koalazak commented on May 22, 2024 2

sorry, i check that and works now :p

from node-telegram-bot-api.

koalazak avatar koalazak commented on May 22, 2024

Similar problem here. With basic example:

var bot = new TelegramBot(token, { polling: true });
bot.on('message', function (msg) {
    console.log(msg)
});

After some hours of running the bot stops receive messages. And i can see a stablished connection to the telegram server IP thats never disconnect. Then hours later get the message:

Unhandled rejection Error: socket hang up
    at createHangUpError (_http_client.js:215:15)
    at TLSSocket.socketOnEnd (_http_client.js:300:23)
    at TLSSocket.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

Restarting the process the bot starts receive old messages again.

Its this issue related to polling?

Any luck fixing this?

from node-telegram-bot-api.

BrOrlandi avatar BrOrlandi commented on May 22, 2024

Have a similar problem here trying to send files over the API.
I'm using: sendPhoto, sendDocument and sendVoice. All of them generates this error.
Text messages are working.

Unhandled rejection Error: 500 
    at /app/node_modules/node-telegram-bot-api/src/telegram.js:111:15
    at tryCatcher (/app/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (/app/node_modules/bluebird/js/main/promise.js:581:18)
    at Promise._settlePromises (/app/node_modules/bluebird/js/main/promise.js:697:14)
    at Async._drainQueue (/app/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/app/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate](/app/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

from node-telegram-bot-api.

BrOrlandi avatar BrOrlandi commented on May 22, 2024

I think sometimes the API have problems, I'm testing with python (eternnoir/pyTelegramBotAPI) and getting error on sending photo and audio files.

from node-telegram-bot-api.

GochoMugo avatar GochoMugo commented on May 22, 2024

@dtsrwnis: you seem to be using a different node module, this library is named node-telegram-bot-api and not node-telegram-bot!

@koalazak: does your problem still persist?

from node-telegram-bot-api.

koalazak avatar koalazak commented on May 22, 2024

@GochoMugo let me check again with the latest...

from node-telegram-bot-api.

GochoMugo avatar GochoMugo commented on May 22, 2024

Issue went too stale...

from node-telegram-bot-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.