openclaw - 💡(How to fix) Fix [Bug]: Matrix client never reaches ready sync state on 2026.4.24 (matrix-js-sdk 41.4.0-rc.0 regression) [1 comments, 1 participants]

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…
GitHub stats
openclaw/openclaw#72186Fetched 2026-04-27 05:33:41
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
closed ×1commented ×1

After auto-update from 2026.4.23 to 2026.4.24, every enabled Matrix account fails to start with Matrix client did not reach a ready sync state within 30000ms and enters an indefinite restart loop, even though the homeserver is healthy and a raw /sync returns in under a second using the same token.

Root Cause

After auto-update from 2026.4.23 to 2026.4.24, every enabled Matrix account fails to start with Matrix client did not reach a ready sync state within 30000ms and enters an indefinite restart loop, even though the homeserver is healthy and a raw /sync returns in under a second using the same token.

Fix Action

Fix / Workaround

Additional information

  • Last known good: 2026.4.23.
  • First known bad: 2026.4.24.
  • Workaround: npm i -g [email protected] and openclaw config set update.auto.enabled false so the next auto-update does not reintroduce the regression.
  • Plugin-only pinning is not a viable workaround:
    • Matrix is shipped as a stock bundled plugin in 2026.4.24, and the install warning is explicit: plugin matrix: duplicate plugin id detected; bundled plugin will be overridden by global plugin (and conversely global plugin will be overridden by bundled plugin, depending on order — either way, swapping in an older @openclaw/matrix from npm cannot beat the in-CLI bundled copy reliably).
    • The last npm-published @openclaw/[email protected] tarball additionally fails to load standalone: Cannot find module '../../shared/channel-status-summary.js' from extensions/matrix/src/channel.ts.
  • Suggested fix: pin matrix-js-sdk back to 41.3.0 (or whatever last stable tag is current) in the bundled matrix plugin's package.json, or upgrade to a non-RC tag once available; if 41.4.0-rc.0 was intentional, confirm whether the SDK changed when sync.state reaches ready and add an SDK upgrade test that exercises the waitForInitialSyncReady path against a real Synapse before bumping.

Code Example

[matrix] [<acct>] starting provider (http://127.0.0.1:8008)
[matrix] [<acct>] channel exited: Matrix client did not reach a ready sync state within 30000ms
[matrix] [<acct>] auto-restart attempt 1/10 in 5s
[matrix] [<acct>] starting provider (http://127.0.0.1:8008)
[matrix] [<acct>] channel exited: Matrix client did not reach a ready sync state within 30000ms
[matrix] [<acct>] auto-restart attempt 2/10 in 11s
... repeats indefinitely ...
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

After auto-update from 2026.4.23 to 2026.4.24, every enabled Matrix account fails to start with Matrix client did not reach a ready sync state within 30000ms and enters an indefinite restart loop, even though the homeserver is healthy and a raw /sync returns in under a second using the same token.

Steps to reproduce

  1. Run OpenClaw 2026.4.24 with at least one enabled Matrix account pointed at a healthy Synapse homeserver (reproduced against a local Synapse on http://127.0.0.1:8008).
  2. Restart the gateway: systemctl --user restart openclaw-gateway.
  3. Watch the journal: journalctl --user -u openclaw-gateway -f | grep '\[matrix\]'.
  4. Each account logs starting provider (<URL>), then ~30s later channel exited: Matrix client did not reach a ready sync state within 30000ms and auto-restart attempt N/10.
  5. From the same host, hit /_matrix/client/v3/account/whoami and /_matrix/client/v3/sync?timeout=0 with the same access token — both return 200 in well under a second.

Expected behavior

On 2026.4.23, with the same openclaw.json, same access tokens, and same homeserver, every account reached a ready sync state and processed inbound/outbound Matrix messages normally.

Actual behavior

The Matrix client's sync.state never transitions to a ready state. The plugin's 30 s waitForInitialSyncReady timeout fires every cycle and the supervisor keeps restarting each provider. No agents receive or send Matrix messages.

OpenClaw version

2026.4.24 (commit cbcfdf6)

Operating system

Ubuntu 24.04.4 LTS — Linux 6.19.0 x86_64

Install method

npm global (Node v22.21.0, npm 10.9.4) — openclaw binary symlinked from ~/.nvm/versions/node/v22.21.0/lib/node_modules/openclaw/openclaw.mjs

Model

N/A — channel/transport bug, no model is reached.

Provider / routing chain

openclaw → matrix-js-sdk → local Synapse (http://127.0.0.1:8008)

Additional provider/model setup details

  • Homeserver: standard Synapse, reachable on loopback, returns 200 on /_matrix/client/versions, /_matrix/client/v3/account/whoami, and /_matrix/client/v3/sync.
  • All affected accounts have encryption: false in channels.matrix.accounts.<name>.
  • 7 enabled accounts on this host; the failure is identical for every one of them on every restart cycle.

Logs, screenshots, and evidence

[matrix] [<acct>] starting provider (http://127.0.0.1:8008)
[matrix] [<acct>] channel exited: Matrix client did not reach a ready sync state within 30000ms
[matrix] [<acct>] auto-restart attempt 1/10 in 5s
[matrix] [<acct>] starting provider (http://127.0.0.1:8008)
[matrix] [<acct>] channel exited: Matrix client did not reach a ready sync state within 30000ms
[matrix] [<acct>] auto-restart attempt 2/10 in 11s
... repeats indefinitely ...

Independent verification using the same access token from the same host:

  • GET http://127.0.0.1:8008/_matrix/client/v3/account/whoami200, valid user_id and device_id, < 0.1 s.
  • GET http://127.0.0.1:8008/_matrix/client/v3/sync?timeout=0&filter={"room":{"timeline":{"limit":1}}}200, ~25 KB body with valid next_batch and joined-rooms list, ~0.2 s.

So /sync itself is healthy; the regression is in the SDK's emission of the sync.state "ready" transition that the plugin awaits.

Code diff between 2026.4.23 and 2026.4.24 (extracted from npm pack [email protected] vs the installed 2026.4.24):

  • dist/extensions/matrix/sdk-*.js: waitForInitialSyncReady, startSyncSession, the imported isMatrixReadySyncState / isMatrixTerminalSyncState (both still imported from the same sync-state-DPh6d4dE.js chunk in both versions), and ensureCryptoSupportInitialized/initializeCryptoIfNeeded are byte-identical apart from one unrelated cross-signing trustOwnDeviceAfterSas callback addition that is gated on encryptionEnabled and so does not run for these accounts.
  • dist/extensions/matrix/package.json dependency changes:
    • matrix-js-sdk: 41.3.041.4.0-rc.0 (RC of the upstream SDK)
    • @matrix-org/matrix-sdk-crypto-wasm: 18.1.018.2.0
    • typebox: 1.1.281.1.31

The 2026.4.24 release notes mention only one Matrix change (#70401, "require full cross-signing identity trust for self-device verification, add openclaw matrix verify self"). The matrix-js-sdk bump from a stable tag to 41.4.0-rc.0 is not called out, which suggests it was an incidental dependency bump rather than an intentional change.

Impact and severity

  • Affected: any user who auto-updated to 2026.4.24 and uses the bundled Matrix channel.
  • Severity: High — total Matrix channel outage; no inbound or outbound Matrix traffic.
  • Frequency: 100% (7/7 enabled accounts on this host, every restart cycle, multiple consecutive restarts observed).
  • Consequence: All Matrix-routed agents are silent until the CLI is rolled back.

Additional information

  • Last known good: 2026.4.23.
  • First known bad: 2026.4.24.
  • Workaround: npm i -g [email protected] and openclaw config set update.auto.enabled false so the next auto-update does not reintroduce the regression.
  • Plugin-only pinning is not a viable workaround:
    • Matrix is shipped as a stock bundled plugin in 2026.4.24, and the install warning is explicit: plugin matrix: duplicate plugin id detected; bundled plugin will be overridden by global plugin (and conversely global plugin will be overridden by bundled plugin, depending on order — either way, swapping in an older @openclaw/matrix from npm cannot beat the in-CLI bundled copy reliably).
    • The last npm-published @openclaw/[email protected] tarball additionally fails to load standalone: Cannot find module '../../shared/channel-status-summary.js' from extensions/matrix/src/channel.ts.
  • Suggested fix: pin matrix-js-sdk back to 41.3.0 (or whatever last stable tag is current) in the bundled matrix plugin's package.json, or upgrade to a non-RC tag once available; if 41.4.0-rc.0 was intentional, confirm whether the SDK changed when sync.state reaches ready and add an SDK upgrade test that exercises the waitForInitialSyncReady path against a real Synapse before bumping.

extent analysis

TL;DR

The most likely fix is to pin matrix-js-sdk back to 41.3.0 in the bundled matrix plugin's package.json to resolve the regression introduced by the upgrade to 41.4.0-rc.0.

Guidance

  • Verify that the issue is indeed caused by the matrix-js-sdk upgrade by checking the version used in the working 2026.4.23 release.
  • Pin matrix-js-sdk to 41.3.0 in the package.json of the bundled matrix plugin to prevent the regression.
  • If the 41.4.0-rc.0 upgrade was intentional, review the SDK's changes to sync.state and update the waitForInitialSyncReady path accordingly.
  • Consider adding a test to exercise the waitForInitialSyncReady path against a real Synapse to prevent similar regressions in the future.

Example

No code snippet is provided as the issue is related to a dependency version change rather than a code implementation.

Notes

The suggested fix assumes that the regression is indeed caused by the matrix-js-sdk upgrade. If the issue persists after pinning the version, further investigation into the SDK's changes and the waitForInitialSyncReady path may be necessary.

Recommendation

Apply the workaround by pinning matrix-js-sdk to 41.3.0 until a non-RC version is available or the issue is resolved in a future release. This will prevent the regression and allow Matrix channels to function as expected.

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…

FAQ

Expected behavior

On 2026.4.23, with the same openclaw.json, same access tokens, and same homeserver, every account reached a ready sync state and processed inbound/outbound Matrix messages normally.

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 client never reaches ready sync state on 2026.4.24 (matrix-js-sdk 41.4.0-rc.0 regression) [1 comments, 1 participants]