openclaw - ✅(Solved) Fix [Bug]: 2026.4.5 bundled Matrix plugin fails at startup with module resolution errors [2 pull requests, 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#62170Fetched 2026-04-08 03:08:09
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×3labeled ×1

After upgrading a previously working setup from 2026.4.2 to 2026.4.5, the bundled Matrix integration no longer starts and enters a restart loop with module resolution errors.

This was a working Matrix setup before the upgrade. No Matrix config or credential changes were made.

Root Cause

After upgrading a previously working setup from 2026.4.2 to 2026.4.5, the bundled Matrix integration no longer starts and enters a restart loop with module resolution errors.

This was a working Matrix setup before the upgrade. No Matrix config or credential changes were made.

Fix Action

Fix / Workaround

Reproduction

  1. Start from a working 2026.4.2 setup with Matrix enabled
  2. Upgrade to 2026.4.5
  3. Start OpenClaw

PR fix notes

PR #62211: fix(matrix): keep bundled plugin SDK self-imports on Jiti

Description (problem / solution / changelog)

Summary

  • keep bundled dist/extensions/* and dist-runtime/extensions/* plugin entrypoints on the alias-aware Jiti path
  • add a regression test for a bundled Matrix-style nested package that imports openclaw/plugin-sdk/account-id
  • extend the shouldPreferNativeJiti() heuristic coverage for bundled plugin outputs

Root cause

shouldPreferNativeJiti() treated bundled plugin JS entrypoints like generic transpiled runtime files and preferred native ESM loading.

For bundled plugins, those files execute inside nested package scopes such as @openclaw/matrix. Native ESM resolution from that scope does not honor the openclaw/plugin-sdk/* alias map, so imports like openclaw/plugin-sdk/account-id can fail with:

Cannot find package 'openclaw' imported from .../extensions/matrix/src/matrix/credentials-read.ts

Keeping bundled plugin entrypoints on Jiti preserves the alias-aware boundary behavior that already works for source plugin entries.

Closes #62170.

Testing

  • node scripts/run-vitest.mjs run --config <temporary-worktree-config> src/plugins/sdk-alias.test.ts src/plugins/runtime-plugin-boundary.whatsapp.test.ts
  • result: 29 passed

Changed files

  • src/plugins/runtime-plugin-boundary.whatsapp.test.ts (modified, +63/-0)
  • src/plugins/sdk-alias.test.ts (modified, +3/-0)
  • src/plugins/sdk-alias.ts (modified, +10/-0)

PR #62330: fix(matrix): harden lazy local runtime loading

Description (problem / solution / changelog)

Summary

  • add a shared alias-safe plugin-local lazy loader for bundled plugin runtime modules
  • move Matrix lazy local runtime imports onto that shared seam across auth, bootstrap, send, monitor, and runtime entry paths
  • add nested-package regression coverage plus plugin-sdk/docs updates for the new lazy-runtime helper

Why

This branch hardens the source-tree / nested-package runtime seam that showed up in the Matrix Docker reports (#62170, #62260).

The root issue is not Matrix auth logic itself; it is raw lazy import("./...") hops inside a bundled plugin package whose lazily loaded modules import openclaw/plugin-sdk/*. In nested package roots, that can fall off the alias-aware loader seam and fail with Cannot find package 'openclaw'.

PR #62316 should address the official Docker runtime path by restoring packaged dist/extensions resolution. This draft keeps the broader source-runtime seam fix separate so we can decide whether we want the extra hardening or just the Docker fix.

Scope boundary

  • no repo-wide plugin migration
  • no Dockerfile changes here
  • Matrix only, plus the shared helper needed to avoid repeating Matrix-specific runtime shims

Testing

  • pnpm build
  • OPENCLAW_LOCAL_CHECK=0 pnpm test extensions/matrix/src/plugin-entry.runtime.test.ts extensions/matrix/src/matrix/client.test.ts extensions/matrix/src/matrix/client-bootstrap.test.ts extensions/matrix/src/matrix/send/client.test.ts
  • OPENCLAW_LOCAL_CHECK=0 pnpm test src/plugin-sdk/lazy-runtime.test.ts
  • OPENCLAW_LOCAL_CHECK=0 pnpm test src/plugins/contracts/runtime-seams.contract.test.ts -t "allows activated runtime facades when the resolved plugin root matches an installed-style manifest record"

Notes

  • src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts still reports pre-existing extension import leaks in Discord/Slack/Telegram doctor-contract files; not introduced by this branch.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/plugins/architecture.md (modified, +3/-0)
  • docs/plugins/sdk-migration.md (modified, +1/-1)
  • docs/plugins/sdk-overview.md (modified, +1/-1)
  • extensions/matrix/index.ts (modified, +9/-4)
  • extensions/matrix/src/actions.ts (modified, +5/-1)
  • extensions/matrix/src/channel.ts (modified, +12/-3)
  • extensions/matrix/src/cli-metadata.ts (modified, +7/-1)
  • extensions/matrix/src/cli.ts (modified, +5/-1)
  • extensions/matrix/src/legacy-crypto.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/client-bootstrap.ts (modified, +22/-7)
  • extensions/matrix/src/matrix/client/config.ts (modified, +32/-18)
  • extensions/matrix/src/matrix/client/create-client.ts (modified, +23/-7)
  • extensions/matrix/src/matrix/client/shared.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/client/storage.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/credentials-write.runtime.ts (modified, +9/-3)
  • extensions/matrix/src/matrix/monitor/startup.ts (modified, +22/-5)
  • extensions/matrix/src/matrix/monitor/verification-events.ts (modified, +10/-2)
  • extensions/matrix/src/matrix/probe.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/sdk.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/sdk/crypto-facade.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/send/client.ts (modified, +5/-1)
  • extensions/matrix/src/onboarding.ts (modified, +5/-1)
  • extensions/matrix/src/plugin-entry.runtime.ts (modified, +13/-4)
  • extensions/matrix/src/setup-core.ts (modified, +5/-1)
  • src/channels/plugins/module-loader.test.ts (modified, +11/-0)
  • src/channels/plugins/module-loader.ts (modified, +9/-88)
  • src/plugin-sdk/facade-runtime.ts (modified, +8/-3)
  • src/plugin-sdk/lazy-runtime.test.ts (added, +71/-0)
  • src/plugin-sdk/lazy-runtime.ts (modified, +41/-0)
  • src/plugins/contracts/plugin-sdk-subpaths.test.ts (modified, +5/-1)
  • src/plugins/local-module-loader.ts (added, +150/-0)

Code Example

[matrix] [default] channel exited: Cannot find package 'openclaw' imported from /app/extensions/matrix/src/matrix/credentials-read.ts

### OpenClaw version

2026.4.5

### Operating system

Docker unraid

### Install method

docker

### Model

gpt-5.4

### Provider / routing chain

User/client → OpenClaw gateway in Docker (Unraid) → bundled Matrix plugin runtime in /app/extensions/matrix → Matrix homeserver

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Bug type

Regression (worked before, now fails)

Summary

After upgrading a previously working setup from 2026.4.2 to 2026.4.5, the bundled Matrix integration no longer starts and enters a restart loop with module resolution errors.

This was a working Matrix setup before the upgrade. No Matrix config or credential changes were made.

Environment

  • OpenClaw version: 2026.4.5
  • Install method: Docker / container
  • Host: Unraid
  • Matrix homeserver: self-hosted
  • Matrix plugin: bundled / enabled in config

Steps to reproduce

Reproduction

  1. Start from a working 2026.4.2 setup with Matrix enabled
  2. Upgrade to 2026.4.5
  3. Start OpenClaw

Expected behavior

Matrix connection should come up

Actual behavior

Actual behavior

Matrix fails to start:

[matrix] [default] channel exited: Cannot find package 'openclaw' imported from /app/extensions/matrix/src/matrix/credentials-read.ts

### OpenClaw version

2026.4.5

### Operating system

Docker unraid

### Install method

docker

### Model

gpt-5.4

### Provider / routing chain

User/client → OpenClaw gateway in Docker (Unraid) → bundled Matrix plugin runtime in /app/extensions/matrix → Matrix homeserver

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell
2026-04-07T00:40:24.067+02:00 [matrix] [default] channel exited: Cannot find package 'openclaw' imported from /app/extensions/matrix/src/matrix/credentials-read.ts

Impact and severity

Matrix stopped working completly

Additional information

No response

extent analysis

TL;DR

The Matrix integration fails to start after upgrading from 2026.4.2 to 2026.4.5 due to a module resolution error, and a potential workaround is to verify the package dependencies and configuration.

Guidance

  • Check the package dependencies in the matrix extension to ensure that the openclaw package is correctly referenced and installed.
  • Verify the configuration files, especially credentials-read.ts, to confirm that the import statements are correct and point to the expected locations.
  • Consider reverting to the previous version (2026.4.2) to confirm if the issue is specific to the 2026.4.5 release.
  • Review the Docker container setup and ensure that the openclaw package is properly installed and configured within the container.

Example

No specific code example is provided due to the lack of detailed code information in the issue.

Notes

The exact cause of the module resolution error is unclear, and further investigation into the package dependencies and configuration is needed to determine the root cause.

Recommendation

Apply workaround: Verify the package dependencies and configuration to resolve the module resolution error, as the issue may be related to a specific change in the 2026.4.5 release.

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

Matrix connection should come up

Still need to ship something?

×6

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

Back to top recommendations

TRENDING