question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slack AppMention events do not get fired reliably

See original GitHub issue

I’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:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Gayathri92commented, Feb 4, 2022

Hi @srajiang, using individual slack apps did not raise this issue. Please feel free to close this issue. Thank you!

0reactions
seratchcommented, Mar 7, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SocketMode app. Sometimes events are not delivered via web ...
For some reason, Slack started to not deliver some message events. When I start SockeModeApp ... Slack AppMention events do not get fired...
Read more >
Using the Slack Events API
The Events API is a streamlined, easy way to build apps and bots that respond to activities in Slack. All you need is...
Read more >
app_mention event - Slack API
Messages sent to your app in direct message conversations are not dispatched via app_mention , whether the app is explicitly mentioned or otherwise....
Read more >
Responding to app mentions - Slack API
Use Socket Mode to listen for app mention events and respond to them with a helpful message.
Read more >
Event types - Slack API
Discover which event types are distributed in the Slack Event APIs. ... dnd_updatedDo not Disturb settings changed for the current userEventsRTM.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found