Closed knobutan closed 2 years ago
Hi @knobutan, thanks for asking the question!
I've checked your code. It seem that the line respond(body)
throws an exception. Perhaps, you might accidentally have added the line. This code never works even with old versions of bolt-python. Your app should work if you remove the line (I've confirmed it works).
# Action when you click GET button
@app.action("button_click")
def action_button_click(body, ack, respond):
# Acknowledge the action
ack()
respond(body) # This line never works
Since this is not an issue caused by either bolt-python or the Slack Platform, let us close this issue now. If you have any follow up questions, feel free to write in.
@seratch Thank you so much for your update and pointing it out. I forgot to remove it after debugging this problem. Is there a forum or QA page where I can post dev related questions?
I reviewed docs again but am still having the same problem with my code. Specifically at calling action from blocks
. If you can clarify my understanding about the flow, that would be great. This is what I intended
blocks
to slackoptions
in elements
Problems I am having are ack() seems not triggered in the first action, and button click action not returning neither ack() nor respond() as if actions are not being triggered at all.
Triggering @app.action stopped working. It was working for the last year, however recently actions are not triggered by button click or selection under mrkdwn. I have updated both bolt and sdk to the latest but the symptom did not change. I planted logger in those @app.action, but I get the impression it is not even called.
Reproducible in:
The
slack_bolt
version$ pip freeze | grep slack slack-bolt==1.13.0 slack-sdk==3.15.2
Python runtime version
Python 3.9.1
OS info
MacOS 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:
test2.py.zip
My app is a simple text fetcher using a slash command.
Expected result:
@app.action("selectci") is called when selecting a value in the dropdown. By clicking GET, it kick off @app.action("button_click") and fetches text
Actual result:
It claims it cannot handle the payload. It was working fine until last week.
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.