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

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?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 20 (1 by maintainers)

Most upvoted comments

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

@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