Skip to content

[Bug]: Slack Socket Mode provider crash-loops on startup with "Cannot read properties of undefined (reading 'listeners')" #21715

@EmpireCreator

Description

@EmpireCreator

Summary

Slack Socket Mode provider crashes immediately on startup and enters an auto-restart loop, leaving Slack non-functional.

Steps to reproduce

  1. Configure Slack channel with valid bot token (xoxb-*) and app token (xapp-*) in Socket Mode.
  2. Start or restart OpenClaw gateway on affected version (>=2026.2.17).
  3. 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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions