bolt-js: app_home_opened event never fires handler
Description
Even after following the proper instructions to enabling App Home, it is impossible to listen to the app_home_opened
, and thus not possible to use App Home with Bolt.
What type of issue is this? (place an x
in one of the [ ]
)
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x
in each of the [ ]
)
- I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
- I’ve read and agree to the Code of Conduct.
- I’ve searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
key | value |
---|---|
package version | 1.4.1 |
node version | 10.13.x |
OS version(s) | ??? containerized Linux |
Steps to reproduce:
- Create a empty Bolt app;
- Set up App Home;
- Add a handler to
app_home_opened
with a simpleconsole.log("Hi")
; - Access your bot’s home tab.
Optionally, forward your bot through a logger/webhook inspector to see the transactions.
Expected result:
Handler to be fired.
Actual result:
Handler is not fired, despite webhook being called.
Attachments:
I’ve contacted Slack support and they helped debug this issue, See attached text transcript for everything we tested: slack_support_logs.txt
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (4 by maintainers)
I’m afraid you haven’t enabled subscription of
app_home_opened
events yet.Enabling App Home doesn’t automatically add
app_home_opened
subscription athttps://api.slack.com/apps/{app id}/event-subscriptions
for you.I have the same issue now. App home events worked yesterday in my app, but the event doesn’t fire today. I’ve tried both through Socket Mode and through Http (ngrok) and ngrok doesn’t register any incoming traffic and the home page says " This is still a work in progress" - it probably times out after 3 seconds.
It looks like the event is not sent at all. For sanity, I’ve also check if node express app receives something, but no. Any request would show up in ngrok in the first place.
If you need info for debugging, I was expecting “app_home_opened” event sent to “https://df1e-185-186-152-216.eu.ngrok.io/slack/events” endpoint at 2023-01-23 19:47 UTC time.
=====EDIT======= Looks like the root cause was that I was missing “app_home_opened” scope in my Event Subscriptions -> Bot Events ^_^" I’m leaving this comment here, since someone may fall for the same issue.
@kroltan
👋 I hope you’re having a wonderful time.
I’d like to suggest two things for this question.
If you use ngrok, you can check the requests on its screen.
Having the following middleware in your Bolt app also may be helpful to check what requests came in.
ack
function callThis is already mentioned above but
ack
function is not available in Events API listeners. For Events API, Bolt automatically acknowledges requests for you.Sure! It’s copied straight from the doc example:
But even a simpler one like below is never invoked.