-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
shouldFallbackToStartupEntry fails on non-English Windows (locale blind spot) #85255
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Describe the bug
shouldFallbackToStartupEntry()insrc/daemon/schtasks.tshas a regex that only matches English and Spanish error messages, causing the fallback mechanism to silently fail on Chinese (and likely other non-English) Windows locales.Steps to reproduce
openclaw update(oropenclaw gateway install --force)schtasks /Createfails with a permission error, the localized error message (e.g.拒绝访问) is not recognizedExpected behavior
The fallback should detect the schtasks failure and create a Startup folder shortcut instead of throwing an unhandled error.
Actual behavior
The update itself succeeds (npm package is updated), and a separate watchdog picks up the gateway, but the service registration step fails entirely.
Root cause
These locale variants are missing:
拒绝访问拒絕存取アクセスが拒否されましたACCÈS REFUSÉZUGRIFF VERWEIGERT액세스가 거부되었습니다Отказано в доступе...and many more.
Suggested fix
Option A (simplest) — widen the regex to cover common locales or use a catch-all:
Option B (more robust) — check the exit code instead of parsing localized text.
schtasks /Createconsistently returns exit code1on access-denied failures regardless of locale. Could change to:Option C — invert the logic: try schtasks, and on any failure, fall back to the Startup folder shortcut. The fallback is already the safe path.
Environment
%APPDATA%/npm/node_modules/openclaw)Context
This issue was masked on my system because a separate watchdog scheduled task restarts the gateway process independently. Without that watchdog, the update would leave the gateway unregistered and not auto-starting on login — the exact scenario the fallback was designed to prevent.