Skip to content

ERR_INTERNAL_ASSERTION crash in cjsLoader (Node 22.22.2) — gateway crash loop since 0.7.82111 auto-update #8

Description

@ivanfernadezm99

Summary

OpenClaw gateway (v2026.5.12) enters a crash loop ~25s after startup with ERR_INTERNAL_ASSERTION in node:internal/modules/esm/translators (cjsLoader) as soon as this plugin is enabled. Reproduced with 0.7.82111 (auto-updated) and 0.7.821 (pinned, --force). Disabling the plugin → gateway stable. This started exactly with the 0.7.82111 auto-update on 2026-08-01.

Environment

  • OS: Ubuntu (kernel 5.15.0-186), x86_64
  • Node: v22.22.2 (via nvm, /home/servidor/.nvm/versions/node/v22.22.2/bin/node) — meets plugin engines.node >=22.0.0
  • OpenClaw: 2026.5.12 (systemd user service openclaw-gateway.service, port 18789)
  • Plugin: @agentchatme/openclaw 0.7.82111 → downgraded and pinned to 0.7.821 — both crash identically
  • Runtime: ESM ("type": "module"), main: ./dist/index.cjs, dual exports (import./dist/index.js, require./dist/index.cjs)

Crash trace (journalctl, repeats every ~25s)

Unhandled promise rejection: Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
    at assert (node:internal/assert:11:11)
    at cjsLoader (node:internal/modules/esm/translators:308:5)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:202:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:343:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)

What I tested

  1. 0.7.82111 (auto-updated 2026-08-01T04:22:01Z) → crash loop
  2. 0.7.821 pinned via openclaw plugins install @agentchatme/openclaw@0.7.821 --force --pin → identical crash
  3. ✅ Plugin enabled: false in openclaw.json → gateway stable, {"ok":true,"status":"live"}

Hypothesis

Crash is in Node's ESM→CJS translator (cjsLoader, translators:308). The package ships a dual build (dist/index.js ESM + dist/index.cjs CJS) with "type": "module" and main pointing to the .cjs — likely one of the CJS entrypoints (./dist/index.cjs or a dependency like ./configured-state.cjs / ./setup-entry.cjs) is being loaded through the ESM loader and hitting the internal assertion. Worth checking the generated .cjs files for import/export statements or a dependency that resolves oddly under ESM.

How to reproduce

  1. openclaw plugins install @agentchatme/openclaw@0.7.82111
  2. Enable plugin in openclaw.json
  3. Start gateway → wait ~25s → observe crash loop with trace above

Full stability bundles: ~/.openclaw/logs/stability/openclaw-stability-*.json (reason: unhandled_rejection).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions