Skip to content

[Bug]: Slack Socket Mode provider crash-loops: Cannot read properties of undefined (reading 'listeners')Β #20144

@EmpireCreator

Description

@EmpireCreator

Summary

Slack Socket Mode provider crashes immediately on startup and loops indefinitely, preventing all Slack communication.

Steps to reproduce

  1. Configure Slack with valid Socket Mode tokens (bot token xoxb-* and app-level token xapp-*)
  2. Start the OpenClaw gateway
  3. Observe crash loop: starting provider β†’ channel exited β†’ auto-restart attempt N/10 repeating indefinitely

Expected behavior

Slack provider starts successfully, establishes a Socket Mode WebSocket connection, and begins receiving/sending messages.

Actual behavior

Provider crashes immediately after "starting provider" with:

Cannot read properties of undefined (reading 'listeners')

Auto-restart triggers up to 10/10, health monitor resets, and the loop repeats indefinitely. No messages are ever processed.

OpenClaw version

2026.2.17

Operating system

macOS 26.2 (arm64)

Install method

Node 22.22.0 β€” full npm update performed (673 packages changed from 2026.2.15 β†’ 2026.2.17)

Logs, screenshots, and evidence

2026-02-18T14:29:06.768Z [slack] [default] starting provider
2026-02-18T14:29:07.002Z [slack] [default] channel exited: Cannot read properties of undefined (reading 'listeners')
2026-02-18T14:29:07.003Z [slack] [default] auto-restart attempt 1/10 in 5s
2026-02-18T14:29:12.507Z [slack] [default] starting provider
2026-02-18T14:29:12.697Z [slack] [default] channel exited: Cannot read properties of undefined (reading 'listeners')
2026-02-18T14:29:12.700Z [slack] [default] auto-restart attempt 2/10 in 11s
...(continues indefinitely through 10/10, health-monitor restarts, repeats)


Tokens verified independently:
- `auth.test` β†’ OK
- `apps.connections.open` β†’ returns valid WSS URL

Gateway restart via `SIGUSR1` did not resolve the issue.

Impact and severity

  • Affected: All users and systems relying on the Slack channel (default)
  • Severity: Blocks workflow entirely β€” bot is offline and non-functional
  • Frequency: Always β€” 100% reproducible on every startup attempt
  • Consequence: No messages can be received or sent via Slack; bot appears offline to all users; requires manual intervention to attempt recovery

Additional information

No fix was achieved via:

  • SIGUSR1 gateway restart
  • Full npm package update (673 packages)

Error occurs before any messages are processed, suggesting the issue is in provider initialization rather than message handling. Both tokens are independently verified as valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions