Slack AppMention events do not get fired reliably
See original GitHub issueI’ve added a slack app to my slack desktop. I also added an event handler in my java code to handle AppMention events.
These are the permissions/subscripts I gave to my slack app:
scopes: bot: - app_mentions:read - chat:write - chat:write.customize - im:history - im:read - im:write - chat:write.public - channels:read - channels:history - groups:history settings: event_subscriptions: bot_events: - app_mention - message.im
When I mention my slack app with @bot_name message in a private channel that I added it to, expected behavior is that it would trigger an AppMention event. Instead it throws a warning as
2022-02-01 18:40:54.041Z [socket-mode-message-processor-worker-61] WARN com.slack.api.bolt.App:1107 - No BoltEventHandler registered for event: message
---
[Suggestion] You can handle this type of event with the following listener function:
app.event(MessageEvent.class, (payload, ctx) -> {
return ctx.ack();
});
It sometimes triggers AppMention events too but not always.
The Slack SDK version
com.slack.api:bolt-socket-mode: 1.15.0
Java Runtime version
java version : 11.0.5
OS info
ProductName: macOS ProductVersion: 11.6
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Hi @srajiang, using individual slack apps did not raise this issue. Please feel free to close this issue. Thank you!
@yehezkiell Yes, the most common cause of this situation is that there are some old processes or hosts that are still receiving requests for the same app but you might totally forget about the running processes (or those processes are unexpectedly still alive). Refer to my response at https://github.com/slackapi/java-slack-sdk/issues/803#issuecomment-895768180 for more details.