openclaw - 💡(How to fix) Fix Windows: browser screenshot and inbound media fail with EPERM on directory fsync

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…

On Windows, \openclaw browser screenshot\ always fails with: \
GatewayClientRequestError: Error: EPERM: operation not permitted, fsync \\

Inbound media from Telegram (images sent by user) also fails silently with the same error, making it impossible to receive image attachments.

Error Message

GatewayClientRequestError: Error: EPERM: operation not permitted, fsync Inbound media from Telegram (images sent by user) also fails silently with the same error, making it impossible to receive image attachments.

Root Cause

The issue is that \ sync()\ on a directory file descriptor is not supported on Windows — it returns \EPERM\ by design. This is a known Windows/libuv limitation (nodejs/node#3879).

Reproduction: \\js const fs = require('fs'); const fd = fs.openSync('C:\\Windows\\Temp\\openclaw', fs.constants.O_RDONLY); fs.fsyncSync(fd); // → EPERM: operation not permitted, fsync \\

File-level fsync works fine; only directory-level fd fsync fails.

Fix Action

Fix / Workaround

Workaround (current)

RAW_BUFFERClick to expand / collapse

Summary

On Windows, \openclaw browser screenshot\ always fails with: \
GatewayClientRequestError: Error: EPERM: operation not permitted, fsync \\

Inbound media from Telegram (images sent by user) also fails silently with the same error, making it impossible to receive image attachments.

Root Cause

The issue is that \ sync()\ on a directory file descriptor is not supported on Windows — it returns \EPERM\ by design. This is a known Windows/libuv limitation (nodejs/node#3879).

Reproduction: \\js const fs = require('fs'); const fd = fs.openSync('C:\\Windows\\Temp\\openclaw', fs.constants.O_RDONLY); fs.fsyncSync(fd); // → EPERM: operation not permitted, fsync \\

File-level fsync works fine; only directory-level fd fsync fails.

Environment

  • OS: Windows 11 (10.0.26200, x64)
  • Node.js: v24.13.1
  • OpenClaw: 2026.5.2
  • Channel: Telegram

Impact

  1. \openclaw browser screenshot\ → always fails (unusable on Windows)
  2. User-sent images via Telegram → \media fetch failed\ (cannot receive photo attachments)

Expected Fix

Skip or catch the EPERM when calling \ sync\ on a directory fd on Windows (\process.platform === 'win32'). The temp file write itself succeeds; the directory fsync is not necessary for correctness on Windows.

Workaround (current)

Capture screenshots via CDP WebSocket directly and save with \ s.writeFileSync, bypassing the OpenClaw screenshot API.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING