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

I can't register a Telegram Bot #34054

Open
AlejandroRM-DEV opened this issue Nov 25, 2024 · 26 comments
Open

I can't register a Telegram Bot #34054

AlejandroRM-DEV opened this issue Nov 25, 2024 · 26 comments

Comments

@AlejandroRM-DEV
Copy link

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
@reetp
Copy link

reetp commented Nov 26, 2024

Seems it needs something enabled on your workspace account.

I'll try and find out.

@casalsgh
Copy link
Contributor

casalsgh commented Dec 2, 2024

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?

@AlejandroRM-DEV
Copy link
Author

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

@casalsgh
Copy link
Contributor

casalsgh commented Dec 2, 2024

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.

@Jairo-Canova
Copy link

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

@casalsgh
Copy link
Contributor

casalsgh commented Dec 3, 2024

FYI - Jairo is from Rocket.Chat support team

@AlejandroRM-DEV
Copy link
Author

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.

@Jairo-Canova
Copy link

Jairo-Canova commented Dec 3, 2024

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.

@reetp
Copy link

reetp commented Dec 4, 2024

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

License Type: Starter

He just tested community as well.

@AlejandroRM-DEV
Copy link
Author

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.

@Jairo-Canova
Copy link

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
Copy link

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

@AlejandroRM-DEV
Copy link
Author

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.

@Jairo-Canova
Copy link

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.

@AlejandroRM-DEV
Copy link
Author

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"
  }
]

@Jairo-Canova
Copy link

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.

@kertiskz
Copy link

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

@AlejandroRM-DEV
Copy link
Author

I couldn't make it work :(

@Jairo-Canova
Copy link

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
Copy link

I couldn't make it work :(

Hello. Same thing showing on logs? Telegram disabled?

@Jairo-Canova
Copy link

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

@Suvendu-UI
Copy link

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

@almod90
Copy link

almod90 commented Dec 17, 2024

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

@Jairo-Canova
Copy link

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

@almod90
Copy link

almod90 commented Dec 17, 2024

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

@Jairo-Canova
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants