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

Telegram trigger don't working #9824

Open
suelliton opened this issue Jun 20, 2024 · 19 comments
Open

Telegram trigger don't working #9824

suelliton opened this issue Jun 20, 2024 · 19 comments
Labels

Comments

@suelliton
Copy link

Bug Description

Telegram Trigger don't works, only in "test workspace" mode, and sometimes dont work too, i tested using npx execution and pm2, the twos have a error.

To Reproduce

Only setting a trigger and waiting a event onmessage, wait indefiniting times and dont works, sometimes the trigger receives all messages triggereds in telegram bot but only in mode of "test workspace" or "test step"

Expected behavior

The trigger running and receiving the messages of telegram bot.

Operating System

Linux Mint

n8n Version

21

Node.js Version

latest

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Jun 20, 2024

Hey @suelliton

Which version of n8n are you using and what Node version?

Have you tried using the container? I have just tried with 1.46.0 and it appears to be working ok for me.

@suelliton
Copy link
Author

Docker version 26.1.4, build 5650f9b
n8n 1.45.1
Its running in a dcoker but dont works yet @Joffcom

@suelliton
Copy link
Author

how i update for newest version?

@leo15dev
Copy link

leo15dev commented Jun 21, 2024

@Joffcom Not everyone encounters this situation, you can refer to the following two reddit discussion articles. I personally encountered it. I am currently using the latest version of n8n and still have problems.

Thank you!
https://www.reddit.com/r/n8n/comments/1coofyz/n8n_telegram_trigger_etimedout/
https://www.reddit.com/r/n8n/comments/1dbpbxl/telegram_credentials/?sort=new

The error message is n8n log is
"
NodeApiError: The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later.
AxiosError: read ECONNRESET
"

The problem is that if you use

curl https://api.telegram.org/bot<your_bot_token>/getMe

It can get the response.

edited

I try Version: 1.47.0, it still not resolved the issue.

@Joffcom
Copy link
Member

Joffcom commented Jun 23, 2024

It sounds like this could be related to the ipv6 issue that was reported on the support forum which was highlighted more by the change to node 20.

Sadly Reddit is not an official support platform so we often miss things posted there although I do try and check out posts when I have time.

I would recommend keeping an eye on this post as it looks like it could be related: https://community.n8n.io/t/errors-since-last-n8n-update-1-44-1/48238/24

@leo15dev
Copy link

@Joffcom Thanks for your reply. At least we can see the clues and hope for solving this issue.

@leo15dev
Copy link

@Joffcom I just test n8nio/n8n:enable-keepAlive, I can successfully save telegram Credentials and perform Telegram trigger, it seems to solve this issue, but I may need to do a longer test.

@janober
Copy link
Member

janober commented Jun 26, 2024

Fix got released with [email protected]

@leo15dev
Copy link

@janober Can confirmed n8nio/n8n:1.47.1 works as well as n8nio/n8n:enable-keepAlive, so I think this issue could be closed?

@suelliton
Copy link
Author

@janober @leo15dev I ran this version here via Docker and it didn't work at all, it's worse than the one I was using before which sometimes crashed

@suelliton
Copy link
Author

@janober @leo15dev whats is the n8n:keepAlive?, im tested with it and it worked, likes good now, but im testing yet

@leo15dev
Copy link

@Joffcom
Copy link
Member

Joffcom commented Jun 27, 2024

@suelliton The keepalive fix from what I understand didn't help the users with the issue but the change made in the PR we went with was a lot better.

When you say it doesn't work with 1.47.1 can you be more specific and share the error you are seeing? It could be that you are seeing 2 different issues one that has been fixed and another that is local to your configuration.

@suelliton
Copy link
Author

@Joffcom In this latest version 1.47.1, nothing worked, I simply didn't receive the message trigger, at all, neither when active nor in "test step" mode, but when I ran it with this keepalive version it worked, soon I will do more tests with both versions

@Joffcom
Copy link
Member

Joffcom commented Jun 27, 2024

@suelliton Did you try using a webhook node outside of the telegram to see if that works? We know that this release has fixed the issue for most users. Have you tried setting NODEJS_PREFER_IPV4=true?

@suelliton
Copy link
Author

@Joffcom the works is intermitent

@suelliton
Copy link
Author

@Joffcom im hospeding the application 8n8 in oracle cloud, and i have the same error with telegram trigger, dont works, im configured the variable NODEJS_PREFER_IPV4=true in docker compose, im using a balancer with a certificate of test ssl. using this command curl -F "url=https://my-ip:443/n8n/webhook/telegram" https://api.telegram.org/bot/setWebhook
and returns {"ok":true,"result":true,"description":"Webhook was set"}, but trigger telegram nothing works, http webhooks works good, and all rest....

@suelliton
Copy link
Author

@Joffcom using the version 1.47.1, i have this error, while tap test workspace : Telegram Trigger: Bad Request: bad webhook: Webhook can be set up only on ports 80, 88, 443 or 8443

@Joffcom
Copy link
Member

Joffcom commented Jul 2, 2024

Hey @suelliton,

That sounds like Telegram is unhappy with the url being sent. What is the webhook_url set to for your instance and does it contain a port?

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