Skip to content

Matrix plugin fails to load in v2026.3.22: Cannot redefine property resolveMatrixAccountStringValues #52891

@gucasbrg

Description

@gucasbrg

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 resolveMatrixAccountStringValues

Both 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.ts

Environment

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions