runtime_command_failed: QuickJS transport delivery failed: 'Buffer' is not defined on any facebook.com URL
What happens
Any navigation to facebook.com fails with a runtime error, while other sites (Reddit, LinkedIn, X,
Quora, Google) work fine in the same Profile and Session:
{
"error": {
"code": "runtime_command_failed",
"message": "QuickJS promise rejected: QuickJS transport delivery failed: 'Buffer' is not defined\nCall log:\n - navigating to \"https://www.facebook.com/\", waiting until \"domcontentloaded\""
}
}
Versions
- webcmd 0.8.4 (npm, latest at the time of writing)
- Cloak runtime 0.4.5 and 0.5.10 — same result after
webcmd daemon restart - Chromium 145.0.7632.109.2
- macOS 27, Apple Silicon
- Node v26.8.2
Reproduction
webcmd --profile <profile> session create "fb" -f json
webcmd --profile <profile> --session <id> browser run --stdin <<'JS'
await page.goto('https://www.facebook.com/', { waitUntil: 'commit' });
await page.waitForTimeout(8000);
return { titolo: await page.title() };
JS
Everything below produces the same error:
https://www.facebook.com/https://www.facebook.com/groups/feed/https://mbasic.facebook.com/waitUntil: 'domcontentloaded'andwaitUntil: 'commit'- a program that returns nothing (
return null) and one that only callsconsole.log(...)— so it is not the size or the shape of the return payload - upgrading the Cloak runtime from 0.4.5 to 0.5.10, then restarting the daemon
Expected
The page navigates like any other site. The Profile is already signed in to Facebook: opening the
session's browser window manually shows the logged-in feed, and the sign-in state survives
session close / session create as documented for Profiles.
Why it matters
webcmd is used here for read-only research on logged-in sites. Facebook groups are the one research surface that requires a signed-in session, so this blocks that use case completely. Every other authenticated site tested on the same Profile works, so it does not look like a profile, session or browser-runtime problem — the failure is in the QuickJS transport layer for this host.
Note on the workaround
Upgrading the browser runtime does not help; it is worth stating in the docs/troubleshooting table if this is a known limitation, so people do not chase the wrong fix.
Hi! I’d be interested in taking a look at this issue and contributing a fix.
The breakage is a realm-boundary leak: host-side code assuming Node globals (Buffer) crossing into a realm that only exposes the web platform. Two layers to it, from our engine work (we run a Chrome-shaped V8 surface and strip every host-runtime trace from page realms):
- The fix: split host code from page-realm code at the boundary. Transport code that runs in-page must be pure web platform — serialize binary as
Uint8Array/base64 before crossing, or bundle a minimalBuffershim inside the injected payload itself. - The deeper reason to fix it beyond the crash: pages probe for
Buffer/process/global, so an automation runtime that leaks Node-isms is detectable. On a site like facebook the crash and the detection tell are the same bug — we delete our host engine's traces per page for exactly this reason.