openclaw - 💡(How to fix) Fix [Bug]: text RangeError: Maximum call stack size exceeded [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#73360Fetched 2026-04-29 06:20:34
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1

在 OpenClaw Control UI 中上传 PDF 或长图片并发送给 WebChat 分析时,请求在 chat.send 阶段失败,返回:

RangeError: Maximum call stack size exceeded

Error Message

RangeError: Maximum call stack size exceeded

Steps to reproduce

openclaw-control-ui-attachment-stack-overflow-report.md

Expected behavior

  • PDF / 长图上传后应正常进入附件解析或媒体 offload 流程。
  • 如果文件过大或格式不支持,应返回明确、可操作的错误,例如:

Root Cause

在 OpenClaw Control UI 中上传 PDF 或长图片并发送给 WebChat 分析时,请求在 chat.send 阶段失败,返回:

RangeError: Maximum call stack size exceeded

Code Example

RangeError: Maximum call stack size exceeded

### Steps to reproduce

[openclaw-control-ui-attachment-stack-overflow-report.md](https://github.com/user-attachments/files/27154259/openclaw-control-ui-attachment-stack-overflow-report.md)

### Expected behavior

- PDF / 长图上传后应正常进入附件解析或媒体 offload 流程。
- 如果文件过大或格式不支持,应返回明确、可操作的错误,例如:

---

而不是 `Maximum call stack size exceeded`
### Actual behavior

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

在 OpenClaw Control UI 中上传 PDF 或长图片并发送给 WebChat 分析时,请求在 chat.send 阶段失败,返回:

RangeError: Maximum call stack size exceeded

### Steps to reproduce

[openclaw-control-ui-attachment-stack-overflow-report.md](https://github.com/user-attachments/files/27154259/openclaw-control-ui-attachment-stack-overflow-report.md)

### Expected behavior

- PDF / 长图上传后应正常进入附件解析或媒体 offload 流程。
- 如果文件过大或格式不支持,应返回明确、可操作的错误,例如:

```text
attachment <file>: exceeds size limit (... > 5000000 bytes)

而不是 Maximum call stack size exceeded

Actual behavior

RangeError: Maximum call stack size exceeded

### OpenClaw version

2026.4.26

### Operating system

macos 26.1

### Install method

_No response_

### Model

openai

### Provider / routing chain

openclaw/chagpt5.5

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue is likely caused by an infinite recursion or a very deep call stack when handling large PDF or image files in the OpenClaw Control UI, and a workaround may involve increasing the maximum call stack size or optimizing the file processing logic.

Guidance

  • Review the chat.send stage in the OpenClaw Control UI code to identify potential recursive function calls or deeply nested loops that could be causing the stack overflow.
  • Consider adding error handling or input validation to prevent large files from being processed in a way that exceeds the maximum call stack size.
  • Investigate the file processing logic to see if there are any optimizations that can be made to reduce the number of function calls or loop iterations.
  • Check if there are any existing configuration options or settings that can be adjusted to increase the maximum call stack size or improve performance.

Example

No specific code example can be provided without more information about the OpenClaw Control UI codebase, but a general example of how to increase the maximum call stack size in Node.js might look like:

// Increase the maximum call stack size
const v8 = require('v8');
v8.setFlagsFromString('--max_call_stack_size=10000');

However, this is just a hypothetical example and may not be applicable to the specific issue at hand.

Notes

The root cause of the issue is unclear without more information about the OpenClaw Control UI code and the specific file processing logic. Further investigation and debugging are needed to determine the best course of action.

Recommendation

Apply a workaround, such as increasing the maximum call stack size or optimizing the file processing logic, as the root cause of the issue is unclear and a full fix may require more information or debugging.

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

  • PDF / 长图上传后应正常进入附件解析或媒体 offload 流程。
  • 如果文件过大或格式不支持,应返回明确、可操作的错误,例如:
attachment <file>: exceeds size limit (... > 5000000 bytes)

而不是 Maximum call stack size exceeded

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]: text RangeError: Maximum call stack size exceeded [1 comments, 2 participants]