GithubHelp home page GithubHelp logo

Comments (17)

bostrot avatar bostrot commented on August 20, 2024

Just experienced something similar with this addition:

bot002    | === UNHANDLED REJECTION ===
bot002    | 'Sat May 15 2021 21:04:25 GMT+0000 (Coordinated Universal Time): Error: 403: Forbidden: bot was blocked by the user\n' +
bot002    |   '    at /bot/node_modules/telegraf/core/network/client.js:281:17\n' +
bot002    |   '    at processTicksAndRejections (node:internal/process/task_queues:94:5)'

It continues after restarting the bot so it probably hangs with the telegram polling and crashes before marking it as read..

I guess we need some checks whether the bot can actually write the user and still mark the message.

EDIT:

I could not reproduce that the bot works only with nodejs v10.24.1. Are you missing some dependencies? What is your log? (I tested including v12.22.1, v14.16.1, v16.2, also some others in earlier stages so I guess you are missing something..)

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

This started happening after the previous update. Before that, it was put without problems. I install NVM, and then go through the node js versions. In all cases, except for version 10, errors appeared. Perhaps you are right and it's about dependencies.

Thank you for your help and quick response!

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

It continues after restarting the bot so it probably hangs with the telegram polling and crashes before marking it as read..

I guess we need some checks whether the bot can actually write the user and still mark the message.

If you just delete the bot, then when you reply to the user, the message comes without problems. If the "stop bot" checkbox is checked when deleting a bot,then this is the error.

from telegram-support-bot.

bostrot avatar bostrot commented on August 20, 2024

In all cases, except for version 10, errors appeared

Could you share some logs or the error messages?

when deleting a bot,then this is the error

I will try to create a check if the bot is blocked and see if it still does the same.

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

Could you share some logs or the error messages?

Okay, I'll do it soon

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

Sometimes your application throws an error of the "Error" type, after which it can continue to work, or it can "hang", and in this case, until I restart, new messages from users do not come. Today there was an error: "b4Error". In debug.log, they are usually not present, or they are also referred to simply as "Error". If I run the app in dev mode, will I collect the errors in a more detailed format?

from telegram-support-bot.

bostrot avatar bostrot commented on August 20, 2024

If it shows only "Error" then the actual error message is empty which makes it very hard to debug. Do you know what happened before it showed the message?

Running in dev mode could give you more details but I can't say for sure that it shows the actual error message then.

from telegram-support-bot.

bostrot avatar bostrot commented on August 20, 2024

Looked into it a bit closer and it seems that commit 9f44bd6 (from issue #52) is the reason:

ctx.reply('Message is not sent due to an error.');

The bot tries to send an error message to the user but as it is blocked it gets into a loop..

from telegram-support-bot.

bostrot avatar bostrot commented on August 20, 2024

Commit 27a707f should be a hotfix for now (for Forbidden: bot was blocked by the user) which catches any error that is thrown by sending an error message to a user that has blocked the bot. Could you try it?

Also regarding the error messages: npm run dev should give you a little more detail about where they come from.

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

Commit 27a707f should be a hotfix for now (for Forbidden: bot was blocked by the user) which catches any error that is thrown by sending an error message to a user that has blocked the bot. Could you try it?

Also regarding the error messages: npm run dev should give you a little more detail about where they come from.

Thanks! I will test it.

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

Updated normally, when the bot is blocked, the app no longer crashes

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

Application installation errors with the latest version of node js (installed via NVM) - Centos 7
https://xpaste.pro/en/p/4fHOS2Db

from telegram-support-bot.

bostrot avatar bostrot commented on August 20, 2024

Thanks for testing and providing the log.

This seems rather like a better-sqlite3 error. Could you try installing it seperately?

npm install better-sqlite3 --save

in your working directory.

from telegram-support-bot.

kultpro avatar kultpro commented on August 20, 2024

This seems rather like a better-sqlite3 error. Could you try installing it seperately?

npm install better-sqlite3 --save

in your working directory.

Similar errors again
https://xpaste.pro/en/p/HvKHfyWp

from telegram-support-bot.

bostrot avatar bostrot commented on August 20, 2024

This is a better-sqlite3 build error. Try installing build tools sudo apt-get install build-essential and if that doesn't work check out their github to find a solution.

from telegram-support-bot.

CodeQuit avatar CodeQuit commented on August 20, 2024

need fix

from telegram-support-bot.

bostrot avatar bostrot commented on August 20, 2024

need fix

@CodeQuit This is already fixed.

You get the message when the users blocks/stops the bot. There is nothing you can do once that happened.

from telegram-support-bot.

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.