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

channel-slack RTMClient does not start #939

Closed
null-directory opened this issue Feb 18, 2020 · 5 comments
Closed

channel-slack RTMClient does not start #939

null-directory opened this issue Feb 18, 2020 · 5 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@null-directory
Copy link

Describe the bug

Slack is deprecating RTM bot permissions. This link currently works but won't past 2020-02-21
Slack: Create new legacy RTM app

On a banner at the top of the newly created app page:

Slack has improved how we handle permissions for apps, so you can now request only the specific scopes your app needs. We recommend updating your app’s scopes. Beginning February 21, all new app submissions to the App Directory must use granular permissions. Read our blog post.

When configuring Slack integration with granular permissions (container (10).log)
, container startup fails with the following error (also attached). Digging in, this seems to be related to how Slack is setting up App integrations, where new apps by default do not use the RTM permissions.

no port specified, defaulting to port 8000 
Listening on http://0.0.0.0:8000 
  ======================================== 
                         
                                     Version 12.5.0              
                                 OS linux ubuntu_18_04          
                        ======================================== 
  App Data Dir: "/root/botpress" 
  Using  modules 
                         analytics 
                         basic-skills 
                         builtin 
                         channel-slack 
                         channel-web 
                         code-editor 
                         examples 
                         extensions 
                         nlu 
                         qna 
                         testing 
                        ⊝ channel-messenger  
                        ⊝ channel-smooch  
                        ⊝ channel-teams  
                        ⊝ channel-telegram  
                        ⊝ hitl  
                        ⊝ misunderstood  
                        ⊝ nlu-extras  
                        ⊝ nlu-testing  
                        ⊝ uipath  
  Loaded 11 modules 
  Loaded 7 content types 
  [greeter] Interactive Endpoint URL: https://botpress.null.directory/api/v1/bots/greeter/mod/channel-slack/bots/greeter/callback 
[INFO]  RTMClient:1 unable to RTM start: An API error occurred: not_allowed_token_type 

To Reproduce
Steps to reproduce the behavior:

  1. Create example greeter bot.
  2. Activate channel-slack module
  3. Configure channel-slack.json for the bot, using tutorial in the Botpress Slack integration
  4. See error

Expected behavior
Botpress starts and greeter bot responds in Slack.

Screenshots

From the container orchestration logs:
image

Warning from the Slack admin page:
image

Counterpoint: creating a legacy bot to show difference:
image

After configuring as tutorial suggests:
image

And here's the bot on my Slack channel:
image

Environment (please complete the following information):

  • OS: Docker image botpress/server:v12_5_0
  • Browser: Chrome
  • Version: 12.5.0
  • NodeJS: ----
@null-directory null-directory added the bug Something isn't working label Feb 18, 2020
@luisbattle
Copy link

Hi
Any idea about the fix?
thanks

@null-directory
Copy link
Author

Looking at the Event and RTM API, I'm guessing we could maybe port directly from RTM to Events. I'm willing to dig into it and learn enough to make a patch, I just won't be able to touch it for a couple weeks or so.

@spg
Copy link
Contributor

spg commented Mar 10, 2020

I confirm the issue is happening. Thanks for reporting.
You can find more information about the upstream issue here: slackapi/node-slack-sdk#921

The solution would be to support both the RTM api (for legacy Slack apps) and the Events (for Bot Granular Permissions apps). Removing support for the RTM api from Botpress would introduce breaking changes to existing Botpress installations.

@stale
Copy link

stale bot commented Jun 18, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 18, 2021
@EFF
Copy link
Contributor

EFF commented Sep 20, 2021

Fixed

@EFF EFF closed this as completed Sep 20, 2021
@michaelmass michaelmass transferred this issue from botpress/botpress Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

7 participants