-
-
Notifications
You must be signed in to change notification settings - Fork 69.7k
Matrix plugin fails to load in v2026.3.22: Cannot redefine property resolveMatrixAccountStringValues #52891
Description
Description
Matrix plugin fails to load in v2026.3.22 with:
TypeError: Cannot redefine property: resolveMatrixAccountStringValues
This occurs on every gateway startup, preventing the Matrix channel from connecting.
Root Cause
In extensions/matrix/src/runtime-api.ts, line 19:
export * from "openclaw/plugin-sdk/matrix";
// ... other exports ...
export * from "./auth-precedence.js"; // ← this re-exports resolveMatrixAccountStringValuesBoth openclaw/plugin-sdk/matrix and ./auth-precedence.js export resolveMatrixAccountStringValues. When jiti compiles and evaluates the module, Object.defineProperty is called twice for the same property name on the exports object, causing the TypeError.
Stack Trace
TypeError: Cannot redefine property: resolveMatrixAccountStringValues
at Object.defineProperty (<anonymous>)
at /app/extensions/matrix/src/runtime-api.ts:19:305
at Array.forEach (<anonymous>)
at /app/extensions/matrix/src/runtime-api.ts:19:84
at eval_evalModule (jiti/dist/jiti.cjs)
Workaround
Remove the duplicate re-export:
sed -i 's|export \* from "./auth-precedence.js";|// patched: removed duplicate re-export|' \
/app/extensions/matrix/src/runtime-api.tsEnvironment
- OpenClaw: v2026.3.22
- Node: v24.14.0
- jiti: v2.6.1
- Docker (OrbStack) on macOS arm64
Additional Context
The comment in runtime-api.ts says:
Keep auth-precedence available internally without re-exporting helper-api twice through both plugin-sdk/matrix and ../runtime-api.js.
But the export * still causes the duplicate. A named re-export excluding resolveMatrixAccountStringValues would fix it.