openclaw - 💡(How to fix) Fix [Bug] Matrix channel dispatch broken in v2026.5.27/5.28 — TypeError: Cannot read properties of undefined (reading 'run')

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After updating from 2026.5.12 to 2026.5.27 (and confirmed in 2026.5.28), the Matrix channel handler crashes on every inbound message with:

[matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')

The bot logs in successfully (matrix: logged in as @<bot>:matrix.<host>), syncs rooms, receives RTC session events, but fails to dispatch any inbound message turn. Users see the bot read their messages without ever responding.

This matches the same crash pattern reported for other channels in this version line:

  • #88216 — Feishu p2p DM dispatch — OPEN
  • #88139 — BlueBubbles channel dispatch — OPEN
  • #87602 — Feishu in v2026.5.27-beta.1 — CLOSED (fix did not reach stable)

→ Looks like a structural plugin-runtime regression affecting multiple channel inbound dispatchers.

Error Message

[matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')

Root Cause

  • #88216 — same root cause, Feishu channel (OPEN)
  • #88139 — same root cause, BlueBubbles channel (OPEN)
  • #87602 — same root cause, Feishu in beta.1 (CLOSED, regression returned in stable)
  • #87990 — @vector-im/matrix-bot-sdk missing from core deps (side effect of update)

Fix Action

Workaround

Full rollback to 2026.5.12 core + @openclaw/[email protected] plugin + restore the pre-update openclaw.json config snapshot. Verified working immediately after rollback (0 errors, clean Matrix login, normal reply dispatch).

NPM_CONFIG_PREFIX=~/.npm-global npm install -g [email protected] @openclaw/[email protected]
cp ~/.openclaw/openclaw.json.bak-pre-5.27 ~/.openclaw/openclaw.json
systemctl restart openclaw

Note: @openclaw/[email protected] is now npm-deprecated (Deprecated: obsolete OpenClaw plugin package version) but functionally fine on 2026.5.12.

Code Example

[matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')

---

dist/monitor.account-CJaXe8-T.js:2870:	const turnResult = await core.channel.inbound.run({
dist/monitor-DWJ7KlrE.js:138:	await core.channel.inbound.run({
dist/channel-runtime-Eq3ifkF3.js:280:	await core.channel.inbound.dispatchReply({

---

dist/monitor-COOR-Ksj.js:	const turnResult = await core.channel.inbound.run({...})

---

2026-05-31T17:42:51 [gateway] loading configuration…
2026-05-31T17:43:03 [gateway] http server listening (8 plugins: ..., matrix, ...)
2026-05-31T17:43:04 [matrix] [default] starting provider (https://matrix.<host>)
2026-05-31T17:43:04 [ensure-matrix-sdk] @vector-im/matrix-bot-sdk missing! Installing...
2026-05-31T17:43:55 [ensure-matrix-sdk] @vector-im/matrix-bot-sdk installed successfully.
2026-05-31T17:44:30 matrix: logged in as @<bot>:matrix.<host>
2026-05-31T17:44:30 [MatrixClient] Resuming queue after resumed sync
2026-05-31T17:44:38 [matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')
2026-05-31T17:44:58 [matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')
... (every inbound message)

---

NPM_CONFIG_PREFIX=~/.npm-global npm install -g openclaw@2026.5.12 @openclaw/matrix@2026.3.13
cp ~/.openclaw/openclaw.json.bak-pre-5.27 ~/.openclaw/openclaw.json
systemctl restart openclaw
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No (affects stable v2026.5.27 and v2026.5.28)

Summary

After updating from 2026.5.12 to 2026.5.27 (and confirmed in 2026.5.28), the Matrix channel handler crashes on every inbound message with:

[matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')

The bot logs in successfully (matrix: logged in as @<bot>:matrix.<host>), syncs rooms, receives RTC session events, but fails to dispatch any inbound message turn. Users see the bot read their messages without ever responding.

This matches the same crash pattern reported for other channels in this version line:

  • #88216 — Feishu p2p DM dispatch — OPEN
  • #88139 — BlueBubbles channel dispatch — OPEN
  • #87602 — Feishu in v2026.5.27-beta.1 — CLOSED (fix did not reach stable)

→ Looks like a structural plugin-runtime regression affecting multiple channel inbound dispatchers.

Environment

  • OpenClaw Core: verified on 2026.5.27 and 2026.5.28
  • Plugin @openclaw/matrix: verified on 2026.3.13, 2026.5.27, and 2026.5.28 (all three crash the same way)
  • Runtime: Node 22.22.2, npm 10.9.7
  • OS: Linux (systemd service), Debian 12
  • Channel: Matrix (self-hosted homeserver)
  • Plugins active (8): active-memory, llm-task, lobster, matrix, memory-core, memory-wiki, nextcloud-talk, openai

Steps to reproduce

  1. Existing bot on stable 2026.5.12 with @openclaw/[email protected] running cleanly (14 days uptime, no errors)
  2. NPM_CONFIG_PREFIX=~/.npm-global npm install -g [email protected]
  3. systemctl restart openclaw
  4. ensure-matrix-sdk auto-installs @vector-im/matrix-bot-sdk (related: #87990)
  5. Bot logs in successfully to Matrix
  6. Every inbound message triggers matrix handler failed: TypeError: Cannot read properties of undefined (reading 'run')

Also tried (none fix the crash):

  • Upgrade plugin to @openclaw/[email protected] (matched core version) — same crash
  • Upgrade plugin to @openclaw/[email protected] (peer-dep openclaw: '>=2026.5.28') and core to 2026.5.28 — same crash
  • Restart between every step — same crash

Only 2026.5.12 + @openclaw/[email protected] is functional.

Failing code location

The bundled chunk path varies per build but the call site is consistent. In 2026.5.28 core:

dist/monitor.account-CJaXe8-T.js:2870:	const turnResult = await core.channel.inbound.run({
dist/monitor-DWJ7KlrE.js:138:	await core.channel.inbound.run({
dist/channel-runtime-Eq3ifkF3.js:280:	await core.channel.inbound.dispatchReply({

The @openclaw/[email protected] plugin chunk also calls:

dist/monitor-COOR-Ksj.js:	const turnResult = await core.channel.inbound.run({...})

core.channel.inbound is undefined at runtime, suggesting the plugin-runtime core object is not having channel.inbound populated before the inbound handler runs. The plugin-SDK file dist/plugin-sdk/channel-inbound.js exists in the core bundle, so the symbol is exported but apparently not wired into the plugin-facing core namespace.

Observed error (log excerpt)

2026-05-31T17:42:51 [gateway] loading configuration…
2026-05-31T17:43:03 [gateway] http server listening (8 plugins: ..., matrix, ...)
2026-05-31T17:43:04 [matrix] [default] starting provider (https://matrix.<host>)
2026-05-31T17:43:04 [ensure-matrix-sdk] @vector-im/matrix-bot-sdk missing! Installing...
2026-05-31T17:43:55 [ensure-matrix-sdk] @vector-im/matrix-bot-sdk installed successfully.
2026-05-31T17:44:30 matrix: logged in as @<bot>:matrix.<host>
2026-05-31T17:44:30 [MatrixClient] Resuming queue after resumed sync
2026-05-31T17:44:38 [matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')
2026-05-31T17:44:58 [matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')
... (every inbound message)

Stack trace is not surfaced in the log (the message is the only line captured), but the location can be derived from grep over the matrix-plugin bundle (monitor-*.jscore.channel.inbound.run).

Expected

core.channel.inbound.run(...) is callable at message dispatch time, the inbound turn completes, the bot replies normally as it did on 2026.5.12.

Workaround

Full rollback to 2026.5.12 core + @openclaw/[email protected] plugin + restore the pre-update openclaw.json config snapshot. Verified working immediately after rollback (0 errors, clean Matrix login, normal reply dispatch).

NPM_CONFIG_PREFIX=~/.npm-global npm install -g [email protected] @openclaw/[email protected]
cp ~/.openclaw/openclaw.json.bak-pre-5.27 ~/.openclaw/openclaw.json
systemctl restart openclaw

Note: @openclaw/[email protected] is now npm-deprecated (Deprecated: obsolete OpenClaw plugin package version) but functionally fine on 2026.5.12.

Related

  • #88216 — same root cause, Feishu channel (OPEN)
  • #88139 — same root cause, BlueBubbles channel (OPEN)
  • #87602 — same root cause, Feishu in beta.1 (CLOSED, regression returned in stable)
  • #87990 — @vector-im/matrix-bot-sdk missing from core deps (side effect of update)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] Matrix channel dispatch broken in v2026.5.27/5.28 — TypeError: Cannot read properties of undefined (reading 'run')