Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

I can't register a Telegram Bot

Open AlejandroRM-DEV opened this issue 1 year ago • 26 comments

Description:

I can't register a Telegram Bot. I have followed the tutorial https://docs.rocket.chat/docs/telegram-app however when I enable the application I get a 403 error. The error I get is as follows:

[ "Failed to register Telegram webhook. Error: ", "{\"stack\":\"Error: Error occurred while registering webhook. Response received from api: {\\\"status\\\":403,\\\"requestId\\\":\\\"6f395e78-6996-4b2e-955f-2f70dd35e960\\\",\\\"errorCode\\\":403,\\\"i18n\\\":\\\"workspace_telegram_disabled\\\",\\\"error\\\":\\\"workspace service record does not have the telegram service account enabled\\\"} with status code: 403\\n at so (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:98:21085)\\n at eventLoopTick (ext:core/01_core.js:168:7)\\n at async Ci.onEnable (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:101:11688)\\n at async handleApp (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/handler.ts:70:26)\\n at async requestRouter (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/main.ts:73:20)\",\"message\":\"Error occurred while registering webhook. Response received from api: {\\\"status\\\":403,\\\"requestId\\\":\\\"6f395e78-6996-4b2e-955f-2f70dd35e960\\\",\\\"errorCode\\\":403,\\\"i18n\\\":\\\"workspace_telegram_disabled\\\",\\\"error\\\":\\\"workspace service record does not have the telegram service account enabled\\\"} with status code: 403\"}" ]

Steps to reproduce:

  1. Save Telegram Bot Token
  2. View logs

Expected behavior:

Receiving and sending messages in omnichannel

Actual behavior:

Captura de pantalla 2024-11-25 a la(s) 11 40 52 a m

Server Setup Information:

  • Version of Rocket.Chat Server: 7.0.0
  • License Type: Starter
  • Number of Users: 2
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • NodeJS Version: 20.17.0
  • MongoDB Version: 6.0.13 / wiredTiger

AlejandroRM-DEV avatar Nov 25 '24 17:11 AlejandroRM-DEV

Seems it needs something enabled on your workspace account.

I'll try and find out.

reetp avatar Nov 26 '24 00:11 reetp

AlejandroRM-DEV, will try to get you some help. Seems something went wrong in the setup - By any chance have you tried to uninstall and restart the process?

casalsgh avatar Dec 02 '24 13:12 casalsgh

Hi. Yes, we redeployed the Docker, restarted it, enabled and disabled the app and nothing worked.

AlejandroRM-DEV avatar Dec 02 '24 16:12 AlejandroRM-DEV

Seems we have a bug on the apps subscription on marketplace. Don't have a good solution for it right now. Would require some manual intervention. Will see if I can get someone to help.

casalsgh avatar Dec 02 '24 16:12 casalsgh

Hello Can you share your workspace URL, or DM me? I'll try to enable with our API

Jairo-Canova avatar Dec 02 '24 18:12 Jairo-Canova

FYI - Jairo is from Rocket.Chat support team

casalsgh avatar Dec 03 '24 12:12 casalsgh

Hello Can you share your workspace URL, or DM me? I'll try to enable with our API

Hi, this is our workspace URL https://chat.oruss.io, if it helps I tried using the community licence and it didn't work either.

AlejandroRM-DEV avatar Dec 03 '24 22:12 AlejandroRM-DEV

Hello Can you share your workspace URL, or DM me? I'll try to enable with our API

Hi, this is our workspace URL https://chat.oruss.io, if it helps I tried using the community licence and it didn't work either.

Hello, Telegram is a Premium app, does not work with Community. Can you please change back to Starter plan, uninstall telegram and install again, restart your workspace and test again? If you want to I can change your plan to Starter from our side, let me know. If possible, also change to debug mode before testing (at Workspace > settings > Logs > log level > 2 , and check if there's anything relevant at Reports > logs (after testing is done, change back to 0 or your workspace might lose performance) Please keep us updated.

Jairo-Canova avatar Dec 03 '24 23:12 Jairo-Canova

The OP said he was on Starter in his first post.

License Type: Starter

He just tested community as well.

reetp avatar Dec 04 '24 07:12 reetp

I didn't see relevant logs.

I didn't know that premium apps don't work on community, I thought they were limited to five because Facebook Messenger works fine, but we can change the license if needed.

AlejandroRM-DEV avatar Dec 04 '24 16:12 AlejandroRM-DEV

The OP said he was on Starter in his first post.

License Type: Starter

He just tested community as well.

Thank you. There's a workaround from our end to enable apps that show disabled on logs, but for it to work he needs to be on a plan that supports that app - he's currently on CE, so it won't work... after changing to Starter I'll try.

We've seen some issues on apps appearing as disabled on logs, our team is looking into it to fix, meanwhile we're doing this workaround

Jairo-Canova avatar Dec 05 '24 18:12 Jairo-Canova

chat.oruss.io

Please change back to Starter at your convenience and let me know here, as I said to reetp above there's a workaround we're using while this is not definitively fixed

Jairo-Canova avatar Dec 05 '24 18:12 Jairo-Canova

I'm not sure where to upgrade to Starter. When I go to the Workspace / Subscription / Upgrade button, it takes me to the Pro Plan checkout page.

AlejandroRM-DEV avatar Dec 05 '24 19:12 AlejandroRM-DEV

chat.oruss.io

I changed from our end just now. Please navigate to Workspace > Subscription > click Sync license update button to apply changes. Then follow the steps provided on my first reply to double-check issue still happens, let me know if it does and I'll do the workaround.

Jairo-Canova avatar Dec 05 '24 20:12 Jairo-Canova

It doesn't work:

[
  "Failed to register Telegram webhook. Error: ",
  {
    "stack": "Error: Error occurred while registering webhook. Response received from API: {\"status\":403,\"requestId\":\"XXXXXXXXXXX\",\"errorCode\":403,\"i18n\":\"workspace_telegram_disabled\",\"error\":\"workspace service record does not have the telegram service account enabled\"} with status code: 403\n    at so (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:98:21085)\n    at eventLoopTick (ext:core/01_core.js:168:7)\n    at async Ci.onEnable (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:101:11688)\n    at async handleApp (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/handler.ts:70:26)\n    at async requestRouter (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/main.ts:74:20)",
    "message": "Error occurred while registering webhook. Response received from API: {\"status\":403,\"requestId\":\"XXXXXXXXXXX\",\"errorCode\":403,\"i18n\":\"workspace_telegram_disabled\",\"error\":\"workspace service record does not have the telegram service account enabled\"} with status code: 403"
  }
]

AlejandroRM-DEV avatar Dec 05 '24 20:12 AlejandroRM-DEV

It doesn't work:

[
  "Failed to register Telegram webhook. Error: ",
  {
    "stack": "Error: Error occurred while registering webhook. Response received from API: {\"status\":403,\"requestId\":\"XXXXXXXXXXX\",\"errorCode\":403,\"i18n\":\"workspace_telegram_disabled\",\"error\":\"workspace service record does not have the telegram service account enabled\"} with status code: 403\n    at so (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:98:21085)\n    at eventLoopTick (ext:core/01_core.js:168:7)\n    at async Ci.onEnable (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:101:11688)\n    at async handleApp (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/handler.ts:70:26)\n    at async requestRouter (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/main.ts:74:20)",
    "message": "Error occurred while registering webhook. Response received from API: {\"status\":403,\"requestId\":\"XXXXXXXXXXX\",\"errorCode\":403,\"i18n\":\"workspace_telegram_disabled\",\"error\":\"workspace service record does not have the telegram service account enabled\"} with status code: 403"
  }
]

Hello. We manually enabled Telegram on your WS, please test again.

Jairo-Canova avatar Dec 06 '24 19:12 Jairo-Canova

Hello, I have the same problem. Rocket.Chat Version: 7.1.0 NodeJS Version: 20.18.0 - x64 MongoDB Version: 6.0.13 MongoDB Engine: wiredTiger Deployment Method: Docker ReplicaSet OpLog: Enabled

kertiskz avatar Dec 11 '24 17:12 kertiskz

I couldn't make it work :(

AlejandroRM-DEV avatar Dec 11 '24 17:12 AlejandroRM-DEV

Hello, I have the same problem. Rocket.Chat Version: 7.1.0 NodeJS Version: 20.18.0 - x64 MongoDB Version: 6.0.13 MongoDB Engine: wiredTiger Deployment Method: Docker ReplicaSet OpLog: Enabled

Hello. Telegram also shows Disabled on logs? Can you tell me your workspace URL?

Jairo-Canova avatar Dec 11 '24 18:12 Jairo-Canova

I couldn't make it work :(

Hello. Same thing showing on logs? Telegram disabled?

Jairo-Canova avatar Dec 11 '24 18:12 Jairo-Canova

Hello. This issue was solved on version 7.0.1 https://github.com/RocketChat/Rocket.Chat/releases/tag/7.0.1

Jairo-Canova avatar Dec 11 '24 20:12 Jairo-Canova

i think this issue is solved right as said by Jairo-Canova

Suvendu-UI avatar Dec 12 '24 07:12 Suvendu-UI

Still getting error with workspace_telegram_disabled. Tried all of 7.0.1, 7.0.3 and 7.1.0 - in every of them Telegram App returns the same error as OPs initial message

almod90 avatar Dec 17 '24 16:12 almod90

Still getting error with workspace_telegram_disabled. Tried all of 7.0.1, 7.0.3 and 7.1.0 - in every of them Telegram App returns the same error as OPs initial message

Hello. it is solved on 7.01~3 but still can happens on 7.1 (we're working on that). Can you try restarting your server after updating? If just that doesn't solve, can you share your WS URL? I'll take a look

Jairo-Canova avatar Dec 17 '24 16:12 Jairo-Canova

Still getting error with workspace_telegram_disabled. Tried all of 7.0.1, 7.0.3 and 7.1.0 - in every of them Telegram App returns the same error as OPs initial message

Hello. it is solved on 7.01~3 but still can happens on 7.1 (we're working on that). Can you try restarting your server after updating? If just that doesn't solve, can you share your WS URL? I'll take a look

Thanks for a quick reply! WS is code.swelectricians.com. I set version 7.0.3 just now - removed and installed back TG app. At first onEnable passed without any errors, but once I put my TG bot token and restart everything it is happening again. enabling/disabling app results the same

almod90 avatar Dec 17 '24 16:12 almod90

code.swelectricians.com

Apologies for the delay. I updated manually your WS as well to enable Telegram, pls try again.

I'll let our team know that this issue happens when downgrading from 7.1 to 7.0.3.

Jairo-Canova avatar Dec 20 '24 19:12 Jairo-Canova

Hello! Please help me solve this problem. Version 7.2.0 When using telegram, we receive an error message: "Error occurred while registering webhook. Response received from api: {"status":403,"requestId":"8f709a86-55e3-4578-8dd4-ea249d537e18","errorCode":403,"i18n":"workspace_telegram_disabled\",\"error":"workspace service record does not have the telegram service account enabled"} with status code: 403"

VNegadov avatar Jan 23 '25 13:01 VNegadov

Hello! Please help me solve this problem. Version 7.2.0 When using telegram, we receive an error message: "Error occurred while registering webhook. Response received from api: {"status":403,"requestId":"8f709a86-55e3-4578-8dd4-ea249d537e18","errorCode":403,"i18n":"workspace_telegram_disabled","error":"workspace service record does not have the telegram service account enabled"} with status code: 403"

Workspace plan Starter Seats. Our workspace: https://cloud.rocket.chat/workspaces/65682a992387120001b84028 https://chat.enterego.ru/

Hello. I tried using my arcane API on this WS and got a 500 error "i18n": "internal_server_error",, is your server running? I can open your login page from browser, not sure why API didn't work. Have you setup reverse proxy? And can you share a print of your Marketplace page for Telegram? AFAIK this was solved on 7.2

Jairo-Canova avatar Jan 23 '25 13:01 Jairo-Canova

Hello! Please help me solve this problem. Version 7.2.0 When using telegram, we receive an error message: "Error occurred while registering webhook. Response received from api: {"status":403,"requestId":"8f709a86-55e3-4578-8dd4-ea249d537e18","errorCode":403,"i18n":"workspace_telegram_disabled","error":"workspace service record does not have the telegram service account enabled"} with status code: 403" Workspace plan Starter Seats.

Hello. I tried using my arcane API on this WS and got a 500 error "i18n": "internal_server_error",, is your server running? I can open your login page from browser, not sure why API didn't work. Have you setup reverse proxy? And can you share a print of your Marketplace page for Telegram? AFAIK this was solved on 7.2

Thanks for the quick reply! https://cloud.enterego.com/index.php/s/9s9WsfAaHiZMq5d - Screenshot our server is running and looks working well we are using it from outside all the time, including mobile app and don't notice any troubles what is arcane api? we use rest api to deliver messages from external system, and it works as well.

VNegadov avatar Jan 23 '25 14:01 VNegadov

on this WS and got a 500 error "i18n": "internal_server_error" how can we reproduce this issue?

VNegadov avatar Jan 23 '25 14:01 VNegadov