Skip to content

[Bug]: Built-in plugins (minimax, google, talk-voice) fail with RangeError: Maximum call stack size exceeded on Windows #73859

@desksk

Description

@desksk

Describe the bug

Multiple built-in plugins fail to load at Gateway startup with RangeError: Maximum call stack size exceeded. This affects the following plugins:

  • minimax
  • google
  • talk-voice

Error Log

[plugins] minimax failed to load from .../openclaw/dist/extensions/minimax/index.js: RangeError: Maximum call stack size exceeded
[plugins] google failed to load from .../openclaw/dist/extensions/google/index.js: RangeError: Maximum call stack size exceeded
[plugins] talk-voice failed to load from .../openclaw/dist/extensions/talk-voice/index.js: RangeError: Maximum call stack size exceeded

Environment

  • OS: Windows_NT 10.0.20348 (x64) / Windows Server 2019
  • Node.js: v24.14.1
  • OpenClaw: v2026.4.26
  • Deployment: Local (npm global install)

Root Cause Analysis

After investigation, the root cause is: the ESM import chain for these bundled plugins is extremely deep (index.js → 20+ shared chunks → cross-references between chunks), which exhausts the Node.js default call stack size during module resolution.

Verification: Loading the same module with --stack-size=65536 succeeds without errors.

node --stack-size=65536 -e require("./minimax/index.js")  # succeeds
node -e require("./minimax/index.js")  # fails with RangeError

Workaround

Setting NODE_OPTIONS=--stack-size=65536 (user-level environment variable) resolves the issue, but requires a Gateway restart to take effect.

Suggested Fix

  1. Reduce the depth of the ESM import chain for these plugins (bundle optimization / chunk merging)
  2. Or set a higher default stack size in the Gateway launcher for Windows environments
  3. Or catch the error gracefully and skip the plugin with a warning instead of crashing

Impact

  • These plugins are completely non-functional
  • Workaround requires environment variable change + Gateway restart
  • Affects all Windows deployments with these bundled plugins

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