-
Notifications
You must be signed in to change notification settings - Fork 235
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
MultiTeamsAuthorization error #1069
Comments
If I understand the situation, you are using Google Cloud Run to host your app. GCR is a serverless system, meaning, it runs on containers that are ephemeral and disappear after each Slack event is processed by your app. However, to store app installation information, you are using the
So, Bolt assumes that every time it runs, there will be a file in the The File Installation Store we provide as an example in Bolt is not recommended for production. For your situation, it is much better to store implement your own Installation Store that is compatible with serverless. For example, you could use a separate database that your GCR functions could interact with (store and retrieve installation information) on each invocation. |
Hi Thank you for pointing out the obvious error in my approach. Ofcourse, duh. I found and implemented this datastore pattern but am still getting My setup is:
I see the following in the logs |
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized. |
(Describe your issue and goal here)
Trying to install a slack bolt python app on google cloud run. This is the workflow of the app
1- user issues a /command
2- a modal is presented to capture parameters of the command
3- the bot writes the user query (as the user) and then creates a thread (so that all responses to the user /command is maintained in one thread)
The app that works end to end but the problem is the user is not notified if someone responds in the thread. This is because the thread is created by the bot in step 3 and it owns it. I have followed the steps by filmaj to no avail.
"Now, when a user goes to install the app to their workspace, your app will be able to get information about which user authorized your app and to what workspace, and you will have the ability to store the tokens associated with each user securely in whatever place you wish (a database, on the filesystem, etc.). You can now use the appropriate user token to have your app do actions completely on behalf of your user (as long as the appropriate user scopes were defined in your app)."
So step 3 should now be owned by the user not by the bot (hence get their notifications). I have implemented the oauth code as stated (here)[https://slack.dev/bolt-python/concepts#authenticating-oauth] as
with following scopes
I manage to install the app (as a end user) on my workspace but when I click anywhere in slack my app icon under "App" section of sidebar disappears. If I try the /command I get
We apologize, but for some unknown reason, your installation with this app is no longer available. Please reinstall this app into your workspace
with this error on the backend
ERROR:slack_bolt.MultiTeamsAuthorization:Although the app should be installed into this workspace, the AuthorizeResult (returned value from authorize) for it was not found.
Reproducible in:
The
slack_bolt
version1.18.1
Python runtime version
3.10.9
OS info
linux
Steps to reproduce:
see above
Expected result:
expect /command to work
Actual result:
We apologize, but for some unknown reason, your installation with this app is no longer available. Please reinstall this app into your workspace
and
ERROR:slack_bolt.MultiTeamsAuthorization:Although the app should be installed into this workspace, the AuthorizeResult (returned value from authorize) for it was not found.
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.
The text was updated successfully, but these errors were encountered: