Skip to content

[Bug]: @vector-im/matrix-bot-sdk missing from dependencies in all 2026.5.x releases (Matrix bridge crash-loops on install) #87990

Closed as not planned

Description

@JMC85x

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Across all published 2026.5.x releases (2026.5.22, .24, .26, .27 latest, 2026.5.28-beta.1), @vector-im/matrix-bot-sdk is missing from the package's declared dependencies, causing the Matrix bridge to crash-loop on a clean npm install -g.

Steps to reproduce

  1. mkdir openclaw-sandbox && cd openclaw-sandbox && npm init -y
  2. npm install openclaw@2026.5.27
  3. Verify the SDK is absent:
    • ls node_modules/openclaw/node_modules/@vector-im → not found
    • ls node_modules/@vector-im → not found
  4. (Optional, no install) confirm via the registry:
    • npm view openclaw@2026.5.27 dependencies --json | grep -i matrix
    • Returns no matrix-bot-sdk; only ./plugin-sdk/matrix (in-tree path under exports, not a runtime dep)
  5. Compare against last known good:
    • npm view openclaw@2026.4.14 dependencies --json | grep -i matrix
    • Returns matrix-js-sdk: 41.3.0 and @matrix-org/matrix-sdk-crypto-wasm: 18.0.0

Expected behavior

@vector-im/matrix-bot-sdk (or whichever SDK the 2026.5.x Matrix bridge imports at runtime) resolves from node_modules after a clean global install, so the Matrix bridge starts without MODULE_NOT_FOUND. In 2026.4.14 the corresponding SDKs (matrix-js-sdk and @matrix-org/matrix-sdk-crypto-wasm) are declared and resolve cleanly.

Actual behavior

@vector-im/matrix-bot-sdk is absent from every 2026.5.x release's dependencies, bundledDependencies, peerDependencies, and optionalDependencies. Sandbox install of 2026.5.22 on 2026-05-28 confirmed both node_modules/openclaw/node_modules/@vector-im and node_modules/@vector-im are not created. Same shape verified statically via npm view for 2026.5.22, 2026.5.24, 2026.5.26, 2026.5.27, and 2026.5.28-beta.1.

OpenClaw version

2026.5.27 (current latest); also reproduced on 2026.5.22, 2026.5.24, 2026.5.26, 2026.5.28-beta.1

Operating system

Windows 11 Pro 10.0.26200

Install method

npm global (npm install -g openclaw@<version>); also verified statically via npm view against the published registry tarballs

Model

N/A — packaging-time bug, occurs before any model is invoked

Provider / routing chain

N/A — packaging-time bug, occurs before any request is dispatched

Additional provider/model setup details

No response

Logs, screenshots, and evidence

$ npm view openclaw@2026.5.27 dependencies --json | grep -i matrix
(no matrix-bot-sdk — full --json output contains only "./plugin-sdk/matrix" under "exports", which is an in-tree path, not a runtime dep)

$ npm view openclaw@2026.4.14 dependencies --json | grep -i matrix
  "matrix-js-sdk": "41.3.0",
  "@matrix-org/matrix-sdk-crypto-wasm": "18.0.0"

$ npm view openclaw@2026.5.27 bundledDependencies bundleDependencies peerDependencies optionalDependencies
{ 'sqlite-vec': '0.1.9' }
(only optionalDependencies has an entry; no matrix-bot-sdk in any of the four fields)

Sandbox install (2026-05-28, 2026.5.22 tarball, fresh npm project):
$ Test-Path "$sandbox\node_modules\openclaw\node_modules\@vector-im\matrix-bot-sdk"  # False
$ Test-Path "$sandbox\node_modules\@vector-im\matrix-bot-sdk"                          # False

Impact and severity

Affected: anyone running a fresh npm install -g openclaw@2026.5.x who relies on the Matrix bridge.
Severity: high — Matrix bridge crash-loops on first boot; install reports success, failure only surfaces at runtime.
Frequency: 5/5 published 2026.5.x versions tested (2026.5.22, 2026.5.24, 2026.5.26, 2026.5.27, 2026.5.28-beta.1).
Consequence: forces users on 2026.4.14 to stay pinned, or to manually npm install @vector-im/matrix-bot-sdk into the global openclaw dir — brittle and undocumented.

Additional information

Last known good: 2026.4.14 (declares matrix-js-sdk@41.3.0 + @matrix-org/matrix-sdk-crypto-wasm@18.0.0).
First known bad in this regression window: 2026.5.22 (also affects 2026.5.24, 2026.5.26, 2026.5.27 latest, 2026.5.28-beta.1 beta).

Looks like the same packaging-omission class as #54760 (WASM crypto deps missing from dist). Likely candidates:

  1. @vector-im/matrix-bot-sdk is listed only in devDependencies of the source repo and the publish pipeline assumes it'll be bundled but doesn't copy it.
  2. A pnpm workspace symlink in source doesn't get rewritten into a runtime dep on publish.
  3. A bundledDependencies entry was removed/forgotten in a 2026.5.x packaging refactor.

Suggested fix: add @vector-im/matrix-bot-sdk to dependencies (or bundledDependencies) for the next 2026.5.x patch release, and gate publishing on an install-time smoke check that the SDK is resolvable from the dist.

Related: #28370, #36501, #41431, #54760, #61787 — same packaging-omission class across prior versions. #87307 — different bug, same affected version line.

Activity

  1. clawsweeper commented on May 29, 2026

    @clawsweeper
    Contributor

    Thanks for writing this up. I checked the repo boundary, and this lives outside the OpenClaw source shell.

    Close as not actionable in core: the report checks the root openclaw package, but Matrix is published and installed as @openclaw/matrix, whose shipped 2026.5.27 and 2026.5.28-beta.1 metadata already declares the runtime SDK dependencies.

    So I’m closing this as outside the OpenClaw source repository rather than keeping it open as core work.

    Review details

    Best possible solution:

    Keep Matrix runtime dependencies owned by @openclaw/matrix and use the documented plugin install/update path; reopen only with a crash trace from a clean plugin install.

    Do we have a high-confidence way to reproduce the issue?

    No. The root-package dependency absence can be observed, but that is expected because Matrix is a separate plugin; the supported @openclaw/matrix packages for 2026.5.27 and 2026.5.28-beta.1 declare the runtime SDK deps.

    Is this the best way to solve the issue?

    No. Adding Matrix SDK deps to the root openclaw package would move plugin-owned runtime deps into core; the maintainable solution is the existing external plugin package and install/update path.

    Security review:

    Security review: Non-PR support/packaging triage; no patch security review applies.

    AGENTS.md: found and applied where relevant.

    What I checked:

    • Current Matrix plugin owns runtime dependencies: Current main declares Matrix runtime dependencies in @openclaw/matrix, including matrix-js-sdk, crypto packages, fake-indexeddb, and media/validation deps. (extensions/matrix/package.json:10, ed62aefeeeb0)
    • Root package intentionally excludes Matrix runtime: The root package file list excludes dist/extensions/matrix/**, matching the external/downloadable plugin model instead of bundling Matrix deps into openclaw. (package.json:93, ed62aefeeeb0)
    • Published latest Matrix package has dependencies: Registry metadata for @openclaw/matrix@2026.5.27 declares matrix-js-sdk, @matrix-org/matrix-sdk-crypto-nodejs, @matrix-org/matrix-sdk-crypto-wasm, fake-indexeddb, and related runtime deps.
    • Published beta Matrix package has dependencies: Registry metadata for @openclaw/matrix@2026.5.28-beta.1 also declares the Matrix runtime dependencies, so the beta line does not show the claimed plugin-package omission.
    • Docs describe Matrix as a plugin install: The current Matrix docs say Matrix is a downloadable channel plugin and instruct users to run openclaw plugins install @openclaw/matrix. Public docs: docs/channels/matrix.md. (docs/channels/matrix.md:9, ed62aefeeeb0)
    • Matrix runtime uses matrix-js-sdk: The current Matrix runtime imports from matrix-js-sdk, not @vector-im/matrix-bot-sdk, matching the dependency declared by the plugin package. (extensions/matrix/src/matrix/sdk.ts:7, ed62aefeeeb0)

    Likely related people:

    • Ninty: Current checkout blame for the Matrix plugin package, docs install guidance, external channel catalog, and dependency contract rows points to this author in the relevant paths. (role: current Matrix packaging source contributor; confidence: medium; commits: ee6eab81439c; files: extensions/matrix/package.json, docs/channels/matrix.md, scripts/lib/official-external-channel-catalog.json)
    • Peter Steinberger: The v2026.5.27 release tag and a recent package CI commit are tied to the release/package surface relevant to the reported published-package behavior. (role: recent release/package surface contributor; confidence: medium; commits: 27ae826f6525, 5871d118ad91; files: package.json)

    Codex review notes: model gpt-5.5, reasoning high; reviewed against ed62aefeeeb0.

  2. added
    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    on May 29, 2026
  3. JMC85x commented on May 31, 2026

    @JMC85x
    Author

    Proposed fix + workaround for affected users

    Filing-author follow-up with a concrete patch the maintainers can drop in, plus a short workaround for anyone hitting this in the wild while a 2026.5.x patch ships.

    1. Suggested package.json patch

    Add the SDK to runtime dependencies. bundledDependencies also works, but plain dependencies is preferable so peer-dedup still happens for anyone already pulling matrix SDKs at the top level:

     {
       "name": "openclaw",
       "version": "2026.5.28",
       "dependencies": {
    +    "@vector-im/matrix-bot-sdk": "^0.7.1",
         "...": "..."
       }
     }

    (Pin to whatever the dist was built against — npm ls @vector-im/matrix-bot-sdk inside the source repo's pnpm workspace will give the resolved version. From the dist require site it looks like the 0.7.x line, but the maintainers should confirm.)

    2. Pre-publish smoke test

    A one-liner that would have caught this regression — runs against the freshly-built tarball, not the source workspace, so workspace symlinks can't hide a missing runtime dep:

    # scripts/verify-pack.sh
    set -euo pipefail
    PKG=$(npm pack --silent)
    TMP=$(mktemp -d)
    tar -xzf "$PKG" -C "$TMP"
    cd "$TMP/package"
    npm install --omit=dev --silent
    node -e "require('@vector-im/matrix-bot-sdk')" \
      || { echo "FAIL: matrix-bot-sdk not resolvable from published tarball"; exit 1; }
    echo "OK: matrix-bot-sdk resolves from packed tarball"

    Wire that into the publish workflow before npm publish runs. The cost is one extra ~10s install; the upside is this exact bug class (#28370, #36501, #41431, #54760, #61787, and now #87990) becomes impossible to ship.

    3. Workaround for users stuck on 2026.5.x today

    Until a patched 2026.5.x lands, anyone needing a 2026.5 feature can either:

    Option A — pin to last-good:

    npm install -g openclaw@2026.4.14

    (This is what we've reverted to in our own deployment — note the 2026.5.x feature set is unavailable here.)

    Option B — manually install the missing SDK into the openclaw dir:

    # After: npm install -g openclaw@2026.5.27
    OPENCLAW_DIR=$(npm root -g)/openclaw
    cd "$OPENCLAW_DIR"
    npm install --no-save @vector-im/matrix-bot-sdk@^0.7.1

    Brittle (gets wiped on the next npm install -g openclaw), but unblocks the Matrix bridge in the meantime.

    If a maintainer would prefer this come in as a PR against the publish-pipeline repo rather than a comment, drop a pointer and I'll open one. Otherwise the diff above is small enough to land directly.

  4. RomneyDa commented on Jun 9, 2026

    @RomneyDa
    Member

    Thanks for the follow-up. The root-package check is not a valid current repro for 2026.5.27+.

    What happened is that an earlier 2026.5 Matrix packaging bug (#77896) made host npm installs look like a missing root dependency problem. The fix direction was not to add Matrix SDK packages to the root openclaw package; Matrix was externalized again, and the Matrix runtime dependencies now belong to the @openclaw/matrix plugin package.

    Current behavior checked:

    • openclaw@2026.5.27 does not ship dist/extensions/matrix/** and does not declare Matrix SDK dependencies. That is expected.
    • @openclaw/matrix@2026.5.27 declares the Matrix runtime dependencies, including matrix-js-sdk and the Matrix crypto packages.
    • The current Matrix runtime imports matrix-js-sdk, not @vector-im/matrix-bot-sdk.

    If Matrix is configured but missing after an upgrade, the supported repair is:

    openclaw doctor --fix

    or explicitly:

    openclaw plugins install @openclaw/matrix

    Do not manually install @vector-im/matrix-bot-sdk or Matrix SDK packages into the root OpenClaw package; that bypasses the plugin install record and will be lost on update.

    I opened a small docs follow-up so this upgrade handoff is clearer: #91753

    Closing this issue because there is no current core/root-package dependency omission to fix. If Matrix still crash-loops after @openclaw/matrix is installed or repaired, please open a fresh issue with openclaw plugins list --json, openclaw channels status, the OpenClaw version, and the gateway log line from the failed Matrix startup.

  5. locked as resolved and limited conversation to collaborators on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.bugSomething isn't workingimpact:crash-loopCrash, hang, restart loop, or process-level availability failure.regressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions