-
Notifications
You must be signed in to change notification settings - Fork 249
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
Lazy Listener Error: NoneType #1217
Comments
@freyguy In this case, you don't use the method decorator provided by App. So, your |
@hello-ashleyintech thanks for catching that! @seratch that seems to drive it to the correct function now and am getting expected results printing in my logs, but I'm still not seeing the message acknowledged in the Slack UI. I'm still able to submit the same response as it seemingly hasn't ack'd the message but I'm not getting a timeout error next to the button. |
If your lamdba execution takes more than 3 seconds (please check AWS's Cloudwatch logs), the runtime performance needs to be adjusted to complete within 3 seconds. A common cause is a cold-start issue with boto3 SDK like this one: #950 (comment) If that's the case, unfortunately there is no workaround on the bolt-python side as boto3 is the bottleneck here. Switching to another solution to load secrets is the only approach I can suggest. |
@seratch That should be easy enough to handle with environment variables. Does the lazy function need to also complete within 3 seconds or can that continue to function beyond the 3 second time out for acknowledgement? I'm a bit confused on that portion having read a number of issues folks have had with Bolt/Lambda |
Lazy listeners do not need to complete within 3 seconds. I mean the ack argument function must complete in 3 seconds to avoid the timeout error on the Slack UI. |
👋 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. |
I'm attempting to use the Slack Bolt Python Lazy Listener function to handle the initial ack() and then run a longer process to interact with secondary systems. I've had success without using the Lazy Listener function in just acknlowedging the response and writing back to the initial user, but whenever I introduce the Lazy Listener function in a testing manner I'm routinely encountering the same error
I was using this article as a template for configuring my application.
Reproducible in:
The
slack_bolt
versionslack-bolt==1.18.1
Python runtime version
Python 3.11.6
OS info
ProductName: macOS
ProductVersion: 14.7.1
BuildVersion: 23H222
zsh: command not found: ver
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
Expected result:
I expect the ack of the response, and my logging to print the lazy function. However the original message is left unacknowledged with the ability to repeat button responses over and over as the response hasn't been ack'd and the following error is produced rather than my logging showing the printing of the lazy function.
I've verified secrets are returned as expected and that the button id is correct.
Actual result:
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: