Node-telegram-bot-api: ETELEGRAM: 409 Conflict: terminated by other long poll or webhook

Created on 29 Dec 2017  路  18Comments  路  Source: yagop/node-telegram-bot-api

Question

I have Telegram Bot running as part of a Node.js script. When terminating the Node.js script by hitting Ctrl + C on my keyboard and restarting the script, I am getting the following error from the bot:

{"code":"ETELEGRAM","message":"ETELEGRAM: 409 Conflict: terminated by other long poll or webhook"}

I guess the error comes from an "unclean" termination of the process (when hitting Ctrl + C on my keyboard). What should I do if there is such an interrupt? Do I need to close a session or anything like that?

question

Most helpful comment

I just recreate Bot Token and the error is gone , i don't know is it works for all of you, but for me it works

All 18 comments

Reinstall node_modules.
For me its work

I use it with https://github.com/remy/nodemon and https://github.com/foreverjs/forever - haven't had such a problem. Several bots are running permanently ~5 months on long polling - very stable. Could you provide more information, please?

I am also facing this issue, only changing API token fixes me.

I'm having the same issue while running the bot with https://github.com/remy/nodemon

@agitaevHi, can u please mention which operating system are you using ???

@droidmanspace hey, I am on macOS 10.13.2. I already solved this issue: my bot was deployed to Heroku and when I launched the bot locally with nodemon, it conflicted - sending the response both, from localhost and Heroku. So, I just turned off the Heroku, while testing locally.

I'm not sure is it the case for others or not

I'm having the same issue but I don't have the same API key on different bots or more than one instance for each bot.

var log = require('./log');
var config = require('./config.json');
var functions = require('./functions');
var TelegramBot = require('node-telegram-bot-api');

process.on('uncaughtException', function (err) {
        log.critical ('Except', err.stack);
});

var bot = new TelegramBot (config.telegram.token, {polling: true});

This is what I'm getting:

error: [polling_error] {"code":"ETELEGRAM","message":"ETELEGRAM: 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}

and

Unhandled rejection Error: ETELEGRAM: 403 Forbidden: user is deactivated at request.then.resp (/root/telegram-bots/liskit-bot/node_modules/node-telegram-bot-api/src/telegram.js:280:15)

Hi, I have the same error in getUpdates method:
"Error: ETELEGRAM: 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running", does somebody know more information or how to check running instances? Thanks.

I am getting this with a new hubot i am trying to run... is hubot still supported using the telegram adapter?

Ok, i can see its connecting and communicating, but this message keeps showing up in the log.

[Mon Mar 05 2018 17:15:14 GMT-0800 (PST)] ERROR Error: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running

@gyoza I'm also getting this error

I have the same error.

Having the same problem. I even restarted my computer to make sure no process got stuck closing. Still just using it in development, so the only instance always is the one I serve in my local environment. Hope someone could point me in the right direction.

Thanks!

I just recreate Bot Token and the error is gone , i don't know is it works for all of you, but for me it works

I still have the same error even revoking the current API key.

Removing the API key u get this error:
error: [polling_error] {"code":"ETELEGRAM","message":"ETELEGRAM: 401 Unauthorized"}

Adding the new API key:
error: [polling_error] {"code":"ETELEGRAM","message":"ETELEGRAM: 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}

Still no ideas?

Thanks all.

Try to increase the polling interval

polling: {
   interval: 1000
}

@andreafspeziale I also have your problem. Have you solved the problem?

@alihesari I've stop working on my bots since a while. So I don't really know. But I've never fixed it.

Try to increase the polling interval

polling: {
   interval: 1000
}

It didn't solve the problem. I also still have issue. I also tried revoking, that fixed the issue for a while then after some time I kept on seeing that error

[polling_error] {"code":"ETELEGRAM","message":"ETELEGRAM: 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dohoon-Kim picture Dohoon-Kim  路  3Comments

dimawebmaker picture dimawebmaker  路  3Comments

jacopocappelli1989 picture jacopocappelli1989  路  4Comments

hems picture hems  路  3Comments

lenny76 picture lenny76  路  3Comments