openclaw - 💡(How to fix) Fix [Bug]: Control UI on iPad/Tailscale fails on image send with `RangeError: Maximum call stack size exceeded` [1 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#63432Fetched 2026-04-09 07:53:45
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

Sending a message from the OpenClaw Control UI on an iPad via the Tailscale-served URL fails with:

RangeError: Maximum call stack size exceeded

This appears to affect image attachment or pasted-image sends in Control UI webchat. Plain text sends succeed.

Error Message

2026-04-08T16:13:40.858-07:00 [ws] ⇄ res ✗ chat.send 39ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=01961749…69af id=a964ee68…e7df 2026-04-08T16:13:46.677-07:00 [ws] ⇄ res ✗ chat.send 35ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=01961749…69af id=7360f2c9…e6b6 2026-04-08T16:17:01.820-07:00 [ws] ⇄ res ✗ chat.send 43ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=21ef04de…cf89 id=ab43110e…df18 2026-04-08T16:28:21.792-07:00 [ws] ⇄ res ✗ chat.send 44ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=88a5a957…b630 id=986194c6…1a0b

Root Cause

Sending a message from the OpenClaw Control UI on an iPad via the Tailscale-served URL fails with:

RangeError: Maximum call stack size exceeded

This appears to affect image attachment or pasted-image sends in Control UI webchat. Plain text sends succeed.

Fix Action

Workaround

  • Use plain text only in the iPad Control UI
  • Avoid screenshots, photos, pasted images, or other image payloads there for now

Code Example

2026-04-08T16:13:40.858-07:00 [ws] ⇄ res ✗ chat.send 39ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=01961749…69af id=a964ee68…e7df
2026-04-08T16:13:46.677-07:00 [ws] ⇄ res ✗ chat.send 35ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=01961749…69af id=7360f2c9…e6b6
2026-04-08T16:17:01.820-07:00 [ws] ⇄ res ✗ chat.send 43ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=21ef04de…cf89 id=ab43110e…df18
2026-04-08T16:28:21.792-07:00 [ws] ⇄ res ✗ chat.send 44ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=88a5a957…b630 id=986194c6…1a0b

---

2026-04-08T16:13:25.942-07:00 [agents] Image resized to fit limits: 1488x2266px 365.8KB -> 88.3KB (-75.9%)
2026-04-08T16:16:37.174-07:00 [agents] Image resized to fit limits: 1488x2266px 365.8KB -> 88.3KB (-75.9%)

---

2026-04-08T16:37:24.648-07:00 [ws] webchat connected conn=00247dde-bb87-4ec2-9bb3-7cf6a72661cd remote=127.0.0.1 client=openclaw-control-ui webchat vcontrol-ui
2026-04-08T16:37:24.726-07:00 [ws] ⇄ res ✓ chat.history 62ms conn=00247dde…61cd id=283a8c11…11c1
2026-04-08T16:37:24.728-07:00 [ws] ⇄ res ✓ node.list 64ms conn=00247dde…61cd id=e68fa25b…3eb3
2026-04-08T16:37:24.728-07:00 [ws] ⇄ res ✓ device.pair.list 64ms conn=00247dde…61cd id=9fa795a3…c3ff
RAW_BUFFERClick to expand / collapse

[Bug]: Control UI on iPad/Tailscale fails on image send with RangeError: Maximum call stack size exceeded

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Sending a message from the OpenClaw Control UI on an iPad via the Tailscale-served URL fails with:

RangeError: Maximum call stack size exceeded

This appears to affect image attachment or pasted-image sends in Control UI webchat. Plain text sends succeed.

Steps to reproduce

  1. Open OpenClaw Control UI on iPad via the Tailscale URL.
  2. Connect normally to the main chat session.
  3. Send a message that includes an image attachment, screenshot, photo, or possibly pasted image payload.
  4. Observe the send fail with RangeError: Maximum call stack size exceeded.
  5. Send a plain text message like test in the same UI.
  6. Observe that plain text succeeds.

Expected behavior

Messages sent from the Control UI on iPad should succeed regardless of whether they include a normal image attachment.

Actual behavior

Image-related sends fail immediately. Gateway logs show normal Control UI connection and history loading, then chat.send fails with:

INVALID_REQUEST: RangeError: Maximum call stack size exceeded

Plain text messages still go through.

Scope / current diagnosis

  • Not a Tailscale connectivity failure
  • Not a general gateway outage
  • Not a generic Control UI login/session failure
  • Likely specific to the Control UI image/attachment path on iPad/Safari or webchat attachment handling

OpenClaw version

  • 2026.4.8

Operating system

  • Host: macOS Darwin 25.4.0 arm64
  • Client: iPad Safari / iPadOS browser via Tailscale-served Control UI

Install method

  • npm global install

Evidence

Failing sends

2026-04-08T16:13:40.858-07:00 [ws] ⇄ res ✗ chat.send 39ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=01961749…69af id=a964ee68…e7df
2026-04-08T16:13:46.677-07:00 [ws] ⇄ res ✗ chat.send 35ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=01961749…69af id=7360f2c9…e6b6
2026-04-08T16:17:01.820-07:00 [ws] ⇄ res ✗ chat.send 43ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=21ef04de…cf89 id=ab43110e…df18
2026-04-08T16:28:21.792-07:00 [ws] ⇄ res ✗ chat.send 44ms errorCode=INVALID_REQUEST errorMessage=RangeError: Maximum call stack size exceeded conn=88a5a957…b630 id=986194c6…1a0b

Image-processing clue immediately before failures

2026-04-08T16:13:25.942-07:00 [agents] Image resized to fit limits: 1488x2266px 365.8KB -> 88.3KB (-75.9%)
2026-04-08T16:16:37.174-07:00 [agents] Image resized to fit limits: 1488x2266px 365.8KB -> 88.3KB (-75.9%)

Control UI connectivity succeeds

2026-04-08T16:37:24.648-07:00 [ws] webchat connected conn=00247dde-bb87-4ec2-9bb3-7cf6a72661cd remote=127.0.0.1 client=openclaw-control-ui webchat vcontrol-ui
2026-04-08T16:37:24.726-07:00 [ws] ⇄ res ✓ chat.history 62ms conn=00247dde…61cd id=283a8c11…11c1
2026-04-08T16:37:24.728-07:00 [ws] ⇄ res ✓ node.list 64ms conn=00247dde…61cd id=e68fa25b…3eb3
2026-04-08T16:37:24.728-07:00 [ws] ⇄ res ✓ device.pair.list 64ms conn=00247dde…61cd id=9fa795a3…c3ff

Text-only send works

A plain text test message sent from the iPad Control UI reached the agent successfully, and did not produce the image-resize log line or stack-overflow error.

Impact

  • iPad users can connect and read chat normally, but cannot reliably send image-based messages through Control UI
  • The failure presents as a raw error instead of a user-friendly message
  • The issue is easy to misdiagnose as a Tailscale or Safari problem when it appears to be attachment-path specific

Workaround

  • Use plain text only in the iPad Control UI
  • Avoid screenshots, photos, pasted images, or other image payloads there for now

Notes

  • Session context was not close to full when the text-only confirmation happened, so this does not currently look like a context-limit-only issue
  • The strongest signal is the repeated Image resized to fit limits line immediately before each failing chat.send

Related issues

  • Possibly related to #30300 (Control UI image send stack overflow on large images), but this reproduction occurred with a much smaller resized image and on iPad/Safari via Tailscale.
  • Possibly related to closed issue #38859, but this reproduction did not require near-full context and plain text succeeded immediately afterward.

extent analysis

TL;DR

The issue can likely be fixed by modifying the image processing logic to prevent excessive recursion, which is causing the "Maximum call stack size exceeded" error when sending image attachments from the Control UI on iPad via Tailscale.

Guidance

  • Investigate the image resizing logic to identify the cause of the excessive recursion, potentially related to the Image resized to fit limits log line.
  • Consider adding a limit to the number of recursive calls or optimizing the image processing algorithm to reduce the call stack size.
  • Verify that the issue is specific to the Control UI image/attachment path on iPad/Safari or webchat attachment handling by testing with different browsers and devices.
  • Review related issues #30300 and #38859 for potential insights into the problem, although the current reproduction occurred with a smaller resized image and on iPad/Safari via Tailscale.

Example

No code snippet is provided due to the lack of explicit code references in the issue.

Notes

The issue may be related to the image resizing logic, but further investigation is needed to determine the root cause. The fact that plain text messages succeed suggests that the issue is specific to image processing.

Recommendation

Apply a workaround by modifying the image processing logic to prevent excessive recursion, as the root cause of the issue appears to be related to image resizing.

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

Messages sent from the Control UI on iPad should succeed regardless of whether they include a normal image attachment.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING