ClawKit Logo
ClawKitReliability Toolkit

Fix Slack Channel Crash (Bolt 4.6.0)

Dependency Incompatibility

If you see message.channels is not a valid event type in your logs, your Slack Bolt dependency has auto-updated to a version incompatible with your current OpenClaw build.

This issue affects all Slack channels using Socket Mode. It usually happens after a fresh npm install or an automated container rebuild.

Next Step

Fix now, then reduce repeat incidents

If this issue keeps coming back, validate your setup in Doctor first, then harden your config.

Symptoms

Error: [slack-bolt] "message.channels" is not a valid event type.
at SlackChannel.init (dist/channels/slack.js:142:9)

Fix 1: Update OpenClaw (Recommended)

The latest release of OpenClaw includes a middleware shim that handles the new Bolt v4 strict event typing.

Update to latest
npm install -g openclaw@latest\nopenclaw gateway restart

Fix 2: Pin Dependency to 4.5.0

If you cannot update OpenClaw yet, you can force the use of the previous stable Bolt version by adding it directly to your environment.

Pin dependency
npm install @slack/[email protected] --save-exact

Fix 3: Docker Rebuild

If running in Docker, ensure your Dockerfile uses a specific version or clear your build cache to avoid pulling the broken transitive dependency.

docker compose build --no-cache
docker compose up -d

Verification

Once fixed, your Slack channel status in the dashboard should change from stopped/error to running.

Did this guide solve your problem?