fix(slack): remove message.channels/message.groups handlers that crash Bolt 4.6#32033
Merged
steipete merged 2 commits intoopenclaw:mainfrom Mar 2, 2026
Merged
Conversation
Contributor
Greptile SummaryRemoves two invalid Slack event handlers (
Confidence Score: 5/5
Last reviewed commit: 8484b6b |
8484b6b to
9bf5e0a
Compare
…h Bolt 4.6 Bolt 4.6 rejects app.event() calls with event names starting with "message." (e.g. "message.channels", "message.groups"), throwing AppInitializationError on startup. These handlers were added in openclaw#31701 based on the incorrect assumption that Slack dispatches typed event names to Bolt. In reality, Slack always delivers events with type:"message" regardless of the Event Subscription name; the channel_type field distinguishes the source. The generic app.event("message") handler already receives all channel, group, IM, and MPIM messages. The additional typed handlers were unreachable even if Bolt allowed them, since no event payload ever carries type:"message.channels". This preserves the handleIncomingMessageEvent refactor from openclaw#31701 (extracting the handler into a named function) while removing only the broken registrations. Fixes the Slack provider crash loop affecting all accounts on @slack/bolt >= 4.6.0. Closes openclaw#31674 (original issue was not caused by missing handlers)
9bf5e0a to
9e1f70e
Compare
Contributor
This was referenced Mar 2, 2026
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
…h Bolt 4.6 (openclaw#32033) * fix(slack): remove message.channels/message.groups handlers that crash Bolt 4.6 Bolt 4.6 rejects app.event() calls with event names starting with "message." (e.g. "message.channels", "message.groups"), throwing AppInitializationError on startup. These handlers were added in openclaw#31701 based on the incorrect assumption that Slack dispatches typed event names to Bolt. In reality, Slack always delivers events with type:"message" regardless of the Event Subscription name; the channel_type field distinguishes the source. The generic app.event("message") handler already receives all channel, group, IM, and MPIM messages. The additional typed handlers were unreachable even if Bolt allowed them, since no event payload ever carries type:"message.channels". This preserves the handleIncomingMessageEvent refactor from openclaw#31701 (extracting the handler into a named function) while removing only the broken registrations. Fixes the Slack provider crash loop affecting all accounts on @slack/bolt >= 4.6.0. Closes openclaw#31674 (original issue was not caused by missing handlers) * fix: document Slack Bolt 4.6 startup handler fix (openclaw#32033) (thanks @mahopan) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
dawi369
pushed a commit
to dawi369/davis
that referenced
this pull request
Mar 3, 2026
…h Bolt 4.6 (openclaw#32033) * fix(slack): remove message.channels/message.groups handlers that crash Bolt 4.6 Bolt 4.6 rejects app.event() calls with event names starting with "message." (e.g. "message.channels", "message.groups"), throwing AppInitializationError on startup. These handlers were added in openclaw#31701 based on the incorrect assumption that Slack dispatches typed event names to Bolt. In reality, Slack always delivers events with type:"message" regardless of the Event Subscription name; the channel_type field distinguishes the source. The generic app.event("message") handler already receives all channel, group, IM, and MPIM messages. The additional typed handlers were unreachable even if Bolt allowed them, since no event payload ever carries type:"message.channels". This preserves the handleIncomingMessageEvent refactor from openclaw#31701 (extracting the handler into a named function) while removing only the broken registrations. Fixes the Slack provider crash loop affecting all accounts on @slack/bolt >= 4.6.0. Closes openclaw#31674 (original issue was not caused by missing handlers) * fix: document Slack Bolt 4.6 startup handler fix (openclaw#32033) (thanks @mahopan) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
OWALabuy
pushed a commit
to kcinzgg/openclaw
that referenced
this pull request
Mar 4, 2026
…h Bolt 4.6 (openclaw#32033) * fix(slack): remove message.channels/message.groups handlers that crash Bolt 4.6 Bolt 4.6 rejects app.event() calls with event names starting with "message." (e.g. "message.channels", "message.groups"), throwing AppInitializationError on startup. These handlers were added in openclaw#31701 based on the incorrect assumption that Slack dispatches typed event names to Bolt. In reality, Slack always delivers events with type:"message" regardless of the Event Subscription name; the channel_type field distinguishes the source. The generic app.event("message") handler already receives all channel, group, IM, and MPIM messages. The additional typed handlers were unreachable even if Bolt allowed them, since no event payload ever carries type:"message.channels". This preserves the handleIncomingMessageEvent refactor from openclaw#31701 (extracting the handler into a named function) while removing only the broken registrations. Fixes the Slack provider crash loop affecting all accounts on @slack/bolt >= 4.6.0. Closes openclaw#31674 (original issue was not caused by missing handlers) * fix: document Slack Bolt 4.6 startup handler fix (openclaw#32033) (thanks @mahopan) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…h Bolt 4.6 (openclaw#32033) * fix(slack): remove message.channels/message.groups handlers that crash Bolt 4.6 Bolt 4.6 rejects app.event() calls with event names starting with "message." (e.g. "message.channels", "message.groups"), throwing AppInitializationError on startup. These handlers were added in openclaw#31701 based on the incorrect assumption that Slack dispatches typed event names to Bolt. In reality, Slack always delivers events with type:"message" regardless of the Event Subscription name; the channel_type field distinguishes the source. The generic app.event("message") handler already receives all channel, group, IM, and MPIM messages. The additional typed handlers were unreachable even if Bolt allowed them, since no event payload ever carries type:"message.channels". This preserves the handleIncomingMessageEvent refactor from openclaw#31701 (extracting the handler into a named function) while removing only the broken registrations. Fixes the Slack provider crash loop affecting all accounts on @slack/bolt >= 4.6.0. Closes openclaw#31674 (original issue was not caused by missing handlers) * fix: document Slack Bolt 4.6 startup handler fix (openclaw#32033) (thanks @mahopan) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove
message.channelsandmessage.groupsevent handler registrations that cause all Slack providers to crash on startup with@slack/bolt@4.6.0.Root Cause
PR #31701 added
ctx.app.event("message.channels", ...)andctx.app.event("message.groups", ...)handlers based on the assumption that Slack dispatches typed event names to Bolt. However:app.event()calls with names starting with"message.", throwingAppInitializationErrortype: "message.channels"— these are subscription labels in the Slack App manifest, not event typestype: "message"and uses thechannel_typefield ("channel"|"group"|"im"|"mpim") to distinguish the sourceapp.event("message")handler already receives all message events regardless of channel typeChanges
messages.ts: Remove the two brokenapp.event("message.channels/groups")registrations; add explanatory comment about subscription labels vs event types. Preserves thehandleIncomingMessageEventfunction extraction from Slack: handle message.channels and message.groups events #31701.messages.test.ts: Replacemessage.channels/message.groupshandler tests with a test verifying channel and group messages are handled via the unified"message"handler usingchannel_type.Verification
pnpm build✅pnpm check✅pnpm test src/slack/monitor/events/messages.test.ts— 7/7 passed ✅Change Type
Scope
Linked Issues
Security Impact
Compatibility