openclaw - 💡(How to fix) Fix [Bug]: Linux: @matrix-org/matrix-sdk-crypto-nodejs missing from npm package (only darwin-arm64 binary bundled) [1 comments, 2 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#53785Fetched 2026-04-08 01:23:26
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

After installing openclaw via npm install -g openclaw on Linux x64, the Matrix plugin fails with:

crypto runtime bootstrap failed: Cannot find module '@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js'

Only matrix-sdk-crypto.darwin-arm64-*.node is present in dist/assets/. The Linux binary (linux-x64-gnu) is missing from the published npm package.

Workaround:

cd /usr/lib/node_modules/openclaw && npm install @matrix-org/matrix-sdk-crypto-nodejs

Environment: Linux x64, OpenClaw 2026.3.23-2, Node 22.22.1

Error Message

See error message:

Root Cause

After installing openclaw via npm install -g openclaw on Linux x64, the Matrix plugin fails with:

crypto runtime bootstrap failed: Cannot find module '@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js'

Only matrix-sdk-crypto.darwin-arm64-*.node is present in dist/assets/. The Linux binary (linux-x64-gnu) is missing from the published npm package.

Workaround:

cd /usr/lib/node_modules/openclaw && npm install @matrix-org/matrix-sdk-crypto-nodejs

Environment: Linux x64, OpenClaw 2026.3.23-2, Node 22.22.1

Fix Action

Fix / Workaround

Workaround:

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

After installing openclaw via npm install -g openclaw on Linux x64, the Matrix plugin fails with:

crypto runtime bootstrap failed: Cannot find module '@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js'

Only matrix-sdk-crypto.darwin-arm64-*.node is present in dist/assets/. The Linux binary (linux-x64-gnu) is missing from the published npm package.

Workaround:

cd /usr/lib/node_modules/openclaw && npm install @matrix-org/matrix-sdk-crypto-nodejs

Environment: Linux x64, OpenClaw 2026.3.23-2, Node 22.22.1

Steps to reproduce

Start OpenClaw 2026.3.23-2 with Matrix plugin installed.

Expected behavior

It worked flawlessly in OpenClaw 2026.3.22

Actual behavior

See error message: crypto runtime bootstrap failed: Cannot find module '@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js'

OpenClaw version

2026.3.23-2

Operating system

Ubuntu 24.04

Install method

npm global

Model

anthropic/sonnet-4.6

Provider / routing chain

openclaw - local webui / matrix

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the issue, we need to ensure the correct binaries for the Linux x64 architecture are included in the @matrix-org/matrix-sdk-crypto-nodejs package. Since the workaround involves installing the package directly, we'll modify the installation process to include the missing binary.

Steps to Fix

  1. Install the required package:

cd /usr/lib/node_modules/openclaw && npm install @matrix-org/matrix-sdk-crypto-nodejs

2. **Verify the binary existence**:
   Check if the Linux binary (`linux-x64-gnu`) is present in `dist/assets/` after installation.
3. **Update OpenClaw**:
   If the issue persists, consider updating OpenClaw to the latest version or checking for any patches related to the Matrix plugin.

### Code Example
No direct code changes are required. However, to automate the installation process, you could create a script that checks for the presence of the binary and installs the package if necessary:
```javascript
const fs = require('fs');
const childProcess = require('child_process');

const binaryPath = '/usr/lib/node_modules/openclaw/dist/assets/linux-x64-gnu';
const packageName = '@matrix-org/matrix-sdk-crypto-nodejs';

if (!fs.existsSync(binaryPath)) {
  console.log('Installing missing binary...');
  childProcess.execSync(`cd /usr/lib/node_modules/openclaw && npm install ${packageName}`);
} else {
  console.log('Binary already exists.');
}

Verification

After applying the fix, restart OpenClaw and verify that the Matrix plugin works without throwing the crypto runtime bootstrap failed error.

Extra Tips

  • Ensure your Node.js and npm versions are up to date to avoid compatibility issues.
  • If the problem persists, check the @matrix-org/matrix-sdk-crypto-nodejs package's issues on GitHub for similar problems or open a new issue if necessary.

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

It worked flawlessly in OpenClaw 2026.3.22

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]: Linux: @matrix-org/matrix-sdk-crypto-nodejs missing from npm package (only darwin-arm64 binary bundled) [1 comments, 2 participants]