Skip to content

One user gets "Although the app should be installed into this workspace", while other does not. #664

@DataGreed

Description

@DataGreed

Reproducible in:

The slack_bolt version

slack-bolt==1.11.1
slack-sdk==3.17.0

(same bug with slack-bolt=1.6.0, I've updated hoping it was resolved)

Python runtime version

Python 3.8.9

OS info

ProductName:	macOS
ProductVersion:	12.3.1
BuildVersion:	21E258
Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64

Steps to reproduce:

  1. Create Django App that uses OAuth based on a template in this repo
  2. Register app.event("message") listener
  3. Install the app with two users using /slack/install view – by a regular user and a workspace owner
  4. Add a bot to #some-channel.
  5. Post some messages in channel by both users, see app.event("message") listener being triggered properly.
  6. Remove the app by workspace owner through a config page.
  7. Reinstall the app by regular user (not a workspace owner).
  8. Add a bot to #some-channel by regular user.
  9. Post a message by regular user, see app.event("message") listener being triggered properly.
  10. Post a message by workspace owner — get a slack middleware error.

Expected result:

app.event("message") listener being triggered properly for all users when message is posted, not just the one who installed the app again

Actual result:

Workspace owner gets slack midleware error:

Applying slack_bolt.middleware.ssl_check.ssl_check.SslCheck
Applying slack_bolt.middleware.request_verification.request_verification.RequestVerification
Applying slack_bolt.middleware.authorization.multi_teams_authorization.MultiTeamsAuthorization
Sending a request - url: https://www.slack.com/api/auth.test, query_params: {}, body_params: {'team_id': 'REDACTED'}, files: {}, json_body: None, headers: {'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': '(redacted)', 'User-Agent': 'Python/3.8.9 slackclient/3.17.0 Darwin/21.4.0'}
Received the following response - status: 200, headers: {'date': 'Wed, 01 Jun 2022 20:17:16 GMT', 'server': 'Apache', 'x-powered-by': 'HHVM/4.153.1', 'access-control-allow-origin': '*', 'referrer-policy': 'no-referrer', 'x-slack-backend': 'r', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'access-control-allow-headers': 'slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x-b3-sampled, x-b3-flags', 'access-control-expose-headers': 'x-slack-req-id, retry-after', 'expires': 'Mon, 26 Jul 1997 05:00:00 GMT', 'cache-control': 'private, no-cache, no-store, must-revalidate', 'pragma': 'no-cache', 'x-robots-tag': 'noindex,nofollow', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'x-slack-req-id': '3097ad69461e3cbeb1e9ddb962672219', 'vary': 'Accept-Encoding', 'content-type': 'application/json; charset=utf-8', 'x-envoy-upstream-service-time': '90', 'x-backend': 'main_normal main_bedrock_normal_with_overflow main_canary_with_overflow main_bedrock_canary_with_overflow main_control_with_overflow main_bedrock_control_with_overflow', 'x-server': 'slack-www-hhvm-main-iad-592u', 'x-slack-shared-secret-outcome': 'no-match', 'via': 'envoy-www-iad-g14r, envoy-edge-lhr-aqga', 'x-edge-backend': 'envoy-www', 'x-slack-edge-shared-secret-outcome': 'no-match', 'connection': 'close', 'transfer-encoding': 'chunked'}, body: {"ok":false,"error":"invalid_auth"}
The stored bot token for enterprise_id: None team_id: REDACTED is no longer valid. (response: {'ok': False, 'error': 'invalid_auth'})
Although the app should be installed into this workspace, the AuthorizeResult (returned value from authorize) for it was not found.
"POST /slack/events HTTP/1.1" 200 52

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions