Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled 'error' event after some hours of running #47

Closed
cod3r-dev opened this issue Nov 17, 2015 · 7 comments
Closed

Unhandled 'error' event after some hours of running #47

cod3r-dev opened this issue Nov 17, 2015 · 7 comments
Labels

Comments

@cod3r-dev
Copy link

Works perfect but after some hours in my raspberry i take this error every time!

bromh7b

@koalazak
Copy link

koalazak commented Dec 9, 2015

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?

@BrOrlandi
Copy link

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)

@BrOrlandi
Copy link

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

@GochoMugo
Copy link
Collaborator

@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?

@GochoMugo GochoMugo added the stale label Jan 6, 2017
@koalazak
Copy link

koalazak commented Jan 6, 2017

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

@GochoMugo
Copy link
Collaborator

Issue went too stale...

@koalazak
Copy link

koalazak commented Feb 9, 2017

sorry, i check that and works now :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants