bolt-python icon indicating copy to clipboard operation
bolt-python copied to clipboard

AsyncApp with OAuth searching for Bot User "UXXXXXXXX" installation when using App Home Messages tab

Open hanslemm opened this issue 5 months ago • 0 comments

I just finished figuring out how to make my Slack App use the OAuth workflow.

I set up it using the f"{my_app_url}/slack/install" endpoint. I am using the standard Bolt OAuth Async class with no custom flow.

The installation store is a custom one that I built using GCS - it has all the methods and attributes as the AWS one. I also checked the store, and it correctly has all the installations at user level, bot level, and installation without user/bot associated.

When sending a message to my bot through the App Home in Slack, messages tab, an error raises stating - correctly - that there is no installation found at f"{workspace_path}/installer-{u_id}-latest", where u_id is the user id, which evaluates to the BOT user ID UXXXXXXXXXX (I removed the alphanumeric to X).

If I exchange messages with my bot app outside the App Home, no error raises - so it is related to the home app, messages tab.

I don't understand why the application is looking for an installation for the Bot user ID, shouldn't the application know that the bot user ID is the bot installation?

Reproducible in:

The slack_bolt version

name : slack-bolt
version : 1.18.1
description : The Bolt Framework for Python

dependencies

  • slack-sdk >=3.25.0,<4

Python runtime version

Python 3.11.6

OS info

ProductName: macOS ProductVersion: 14.2.1 BuildVersion: 23C71 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000

Steps to reproduce:

(Share the commands to run, source code, and project settings (e.g., setup.py))

  1. App must be running, of course.
  2. I sent a message to my bot through the App Home in Slack, messages tab.
  3. Raises the above-mentioned error that couldn't find the installation

Expected result:

The app shouldn't raise installation errors when using the messages tab of the App Home in Slack.

Actual result:

Mentioned in the introduction.

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

hanslemm avatar Feb 05 '24 09:02 hanslemm