openclaw - 💡(How to fix) Fix WhatsApp pairing fails: `qrcode` npm package missing from bundled runtime-deps in 2026.4.29 [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#75874Fetched 2026-05-02 05:28:38
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
closed ×1commented ×1

openclaw configure --section channels (and the Control UI dashboard) cannot complete WhatsApp pairing on a fresh install of 2026.4.29. The pairing flow successfully connects to WhatsApp's CDN and receives QR refresh tokens (6 rotations, then status=408 QR refs attempts ended), but the QR is never rendered.

Error Message

Dashboard error message:

Root Cause

dist/qr-terminal-DI6mj_pL.js does import("qrcode") (bare specifier), but the qrcode npm package is not present in node_modules at either the npm install (~/.nvm/.../node_modules/openclaw/node_modules/) or the bundled runtime-deps (~/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-*/node_modules/).

Dashboard error message:

Failed to render the WhatsApp QR: Cannot find package 'qrcode' imported from
.../dist/qr-terminal-DI6mj_pL.js
Did you mean to import "qrcode/lib/index.js"?

The shim is also present (and equally broken) in 2026.4.27 and 2026.4.26 runtime-deps, so this isn't a regression in 2026.4.29 — it appears to have been a long-standing miss in the bundled deps that no fresh-pair tester has hit until now.

Fix Action

Fix / Workaround

Workaround for users on 2026.4.29

Patch ~/.nvm/.../node_modules/openclaw/dist/qr-terminal-DI6mj_pL.js to import qrcode from a manually-installed location:

qrCodeRuntimePromise = import("file:///tmp/qr-helper/node_modules/qrcode/lib/index.js")
  .then((mod) => mod.default ?? mod);

After npm install qrcode --prefix /tmp/qr-helper. (The runtime-deps copy of the shim gets wiped by openclaw's auto-sync, so the npm install location is the durable patch site.)

Code Example

Failed to render the WhatsApp QR: Cannot find package 'qrcode' imported from
.../dist/qr-terminal-DI6mj_pL.js
Did you mean to import "qrcode/lib/index.js"?

---

qrCodeRuntimePromise = import("file:///tmp/qr-helper/node_modules/qrcode/lib/index.js")
  .then((mod) => mod.default ?? mod);
RAW_BUFFERClick to expand / collapse

Summary

openclaw configure --section channels (and the Control UI dashboard) cannot complete WhatsApp pairing on a fresh install of 2026.4.29. The pairing flow successfully connects to WhatsApp's CDN and receives QR refresh tokens (6 rotations, then status=408 QR refs attempts ended), but the QR is never rendered.

Root cause

dist/qr-terminal-DI6mj_pL.js does import("qrcode") (bare specifier), but the qrcode npm package is not present in node_modules at either the npm install (~/.nvm/.../node_modules/openclaw/node_modules/) or the bundled runtime-deps (~/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-*/node_modules/).

Dashboard error message:

Failed to render the WhatsApp QR: Cannot find package 'qrcode' imported from
.../dist/qr-terminal-DI6mj_pL.js
Did you mean to import "qrcode/lib/index.js"?

The shim is also present (and equally broken) in 2026.4.27 and 2026.4.26 runtime-deps, so this isn't a regression in 2026.4.29 — it appears to have been a long-standing miss in the bundled deps that no fresh-pair tester has hit until now.

Reproduction

  1. Fresh npm install -g [email protected]
  2. Start gateway, run openclaw configure --section channels
  3. Walk through prompts, select WhatsApp, answer Yes at "Link WhatsApp now (QR)?"
  4. "Scan this QR" header prints 6 times with no QR rendered, then status=408

Suggested fix

Add qrcode to the bundled runtime-deps manifest (it's only ~50KB), or replace the dynamic import("qrcode") with qrcode-terminal which is already in the deps and exposes a terminal-rendering API.

Workaround for users on 2026.4.29

Patch ~/.nvm/.../node_modules/openclaw/dist/qr-terminal-DI6mj_pL.js to import qrcode from a manually-installed location:

qrCodeRuntimePromise = import("file:///tmp/qr-helper/node_modules/qrcode/lib/index.js")
  .then((mod) => mod.default ?? mod);

After npm install qrcode --prefix /tmp/qr-helper. (The runtime-deps copy of the shim gets wiped by openclaw's auto-sync, so the npm install location is the durable patch site.)

extent analysis

TL;DR

Add the qrcode package to the bundled runtime-deps manifest or replace the dynamic import("qrcode") with qrcode-terminal to fix the WhatsApp pairing issue.

Guidance

  • Verify that the qrcode package is not present in node_modules at either the npm install or the bundled runtime-deps locations.
  • Check the dashboard error message for the "Cannot find package 'qrcode'" error to confirm the issue.
  • Consider patching the qr-terminal-DI6mj_pL.js file to import qrcode from a manually-installed location as a temporary workaround.
  • Review the suggested fix of adding qrcode to the bundled runtime-deps manifest or replacing the dynamic import with qrcode-terminal.

Example

The provided workaround code snippet demonstrates how to patch the qr-terminal-DI6mj_pL.js file:

qrCodeRuntimePromise = import("file:///tmp/qr-helper/node_modules/qrcode/lib/index.js")
  .then((mod) => mod.default ?? mod);

This requires manually installing qrcode with npm install qrcode --prefix /tmp/qr-helper.

Notes

The issue appears to be a long-standing problem that has not been encountered until now, and the suggested fix or workaround should resolve the WhatsApp pairing issue.

Recommendation

Apply the workaround by patching the qr-terminal-DI6mj_pL.js file, as this provides a temporary solution for users on 2026.4.29 until the qrcode package is added to the bundled runtime-deps manifest.

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…

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 WhatsApp pairing fails: `qrcode` npm package missing from bundled runtime-deps in 2026.4.29 [1 comments, 2 participants]