-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Summary
Slack Socket Mode provider crashes immediately on startup and enters an auto-restart loop, leaving Slack non-functional.
Steps to reproduce
- Configure Slack channel with valid bot token (
xoxb-*) and app token (xapp-*) in Socket Mode. - Start or restart OpenClaw gateway on affected version (
>=2026.2.17). - Observe provider logs during startup.
Expected behavior
Slack provider starts successfully, establishes Socket Mode connection, and processes inbound/outbound messages.
Actual behavior
Provider exits on startup with Cannot read properties of undefined (reading 'listeners'), then loops through auto-restart attempts (1/10 → 10/10) and remains unavailable.
OpenClaw version
2026.2.19-2 (also reproduced since 2026.2.17)
Operating system
macOS 26.2 (arm64)
Install method
npm global (Node 22.22.0)
Logs, screenshots, and evidence
Representative logs:
[default] starting provider[default] channel exited: Cannot read properties of undefined (reading 'listeners')[default] auto-restart attempt 1/10 in 5s(continues through 10/10)
Related references:
- [Bug]: Slack channel crashes on startup with 'Cannot read properties of undefined (reading listeners)' in v2026.2.17 #19788
- [Bug]: TypeError: Cannot read properties of undefined (reading 'some') during startup #8404
- [Bug]: Slack Socket Mode provider crash-loops: Cannot read properties of undefined (reading 'listeners') #20144
- Related PR: fix(slack): bind
thiscontext forapp.options()in slash command arg menus #19911
Confirmed one-line fix in slash-command options registration path:
- const optionsHandler = ctx.app.options;
+ const optionsHandler = ctx.app.options?.bind(ctx.app);Impact and severity
Affected: Slack-connected OpenClaw instances using Socket Mode
Severity: Critical (blocks Slack channel entirely)
Frequency: 100% reproducible on affected versions/config
Consequence: No Slack messages can be received/sent; assistant appears offline in Slack
Additional information
Root cause appears to be detached this when invoking Bolt App.options() in Slack monitor command-option registration (registerArgOptions).
Scope boundary of proposed fix:
- No auth/token handling changes
- No non-Slack channel changes
- No routing/policy default changes
Known separate issue (tracked independently): stream-stop error missing_recipient_team_id may still appear after startup fix; this report focuses on startup crash-loop only.