Skip to content

fix(browser): read Chrome version from PE metadata on Windows - #87344

Closed
Jefsky wants to merge 2 commits into
openclaw:mainfrom
Jefsky:fix/chrome-version-detection-windows
Closed

Jefsky wants to merge 2 commits into
openclaw:mainfrom
Jefsky:fix/chrome-version-detection-windows

Conversation

@Jefsky

@Jefsky Jefsky commented May 27, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #87312

openclaw doctor reports "Could not determine the installed Chrome version" even when Chrome is installed at the expected path with correct version metadata (Chrome 148.x in this case).

Root Cause

The readBrowserVersion function on Windows runs chrome.exe --version to determine the installed version. Launching Chrome this way can fail on Windows because:

  • Chrome may attempt to show a GUI or conflict with an already-running instance
  • The process startup can be slow and hit the timeout
  • Chrome's Windows process model differs from macOS/Linux where --version returns immediately

Fix

Added a Windows-specific code path that reads file version metadata directly from the PE executable using PowerShell (Get-Item).VersionInfo.ProductVersion, which:

  • Is instant (no process launch)
  • Works correctly with all Chrome versions including 148+
  • Falls back to wmic if PowerShell is unavailable

The chrome.exe --version fallback remains as a last resort.

Testing

  • Windows 11 with Chrome 148.0.7778.179 at default install path
  • openclaw doctor now correctly detects "Detected Chrome 148.0.7778.179"
  • No change to macOS or Linux behavior

On Windows, openclaw doctor fails to detect the Chrome version despite
Chrome being installed at the expected path with correct ProductVersion
metadata. The issue is that readBrowserVersion runs chrome --version
which can fail due to process startup delays, GUI interference, or
instance conflicts on Windows.

Fix by adding a Windows-specific fallback that reads the file version
info directly from the PE executable using PowerShell (Get-Item). This
avoids launching Chrome entirely, making the check fast and reliable.
If PowerShell fails, falls back to wmic as a secondary option.
@clawsweeper

clawsweeper Bot commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the contribution. This PR still needs the requested real-behavior proof, and the branch has been idle since that ask.

Close: this external PR has a useful Windows Browser doctor fix idea, but the requested real Windows proof has been absent since the June 13 proof nudge and the head/check activity has been idle since June 20.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #87312
Summary: The canonical item is the Windows Browser doctor false Chrome-version warning; this PR and the sibling PR are candidate fixes, but neither has supplied positive live Windows proof or merged.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

So I’m closing this for now to keep the review queue honest. Please reopen or open a fresh PR with real-behavior proof (a live run, logs, or a reproducible validation transcript) and it will be reviewed again.

Review details

Best possible solution:

Close this idle branch for now; if work resumes, land one canonical Browser-plugin fix with redacted Windows doctor proof, focused version-reader coverage, and a clear compatibility story.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible: current main calls readBrowserVersion, parses the result, and emits the reported warning when Windows version probing returns null. I did not establish a live Windows reproduction in this read-only review.

Is this the best way to solve the issue?

Mostly yes on direction, but not merge-ready: reading Windows executable metadata before launching Chrome is owner-local and preserves the generic fallback when metadata is absent. The branch should not stay open without the requested real Windows proof and canonical-branch decision.

Security review:

Security review cleared: The diff adds local Windows metadata probes through existing process-execution patterns and does not change dependencies, workflows, lockfiles, secrets, permissions, or publishing surfaces.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy read: Root AGENTS.md and scoped extensions/AGENTS.md were read fully; their proof, compatibility, and bundled-plugin boundary guidance apply to this PR. (AGENTS.md:1, 286d0b9fb340)
  • Current main behavior: Current main still has only the macOS bundle metadata branch followed by the executable --version probe; there is no Windows ProductVersion or WMIC path on main. (extensions/browser/src/browser/chrome.executables.ts:747, 286d0b9fb340)
  • Doctor warning path: Browser doctor reads the resolved Chrome path, parses the version, and emits the reported unknown-version warning when the version is missing or unparsable. (extensions/browser/src/doctor-browser.ts:324, 286d0b9fb340)
  • PR patch surface: The patch adds a win32 branch before the existing fallback, plus a PowerShell ProductVersion probe and WMIC fallback in the browser executable helper. (extensions/browser/src/browser/chrome.executables.ts:741, 3823d5468484)
  • Expired proof ask: A ClawSweeper proof nudge was posted on 2026-06-13, and the PR still has triage: needs-real-behavior-proof plus status: 📣 needs proof with no inspectable Windows doctor output added. (3823d5468484)
  • Inactive head and checks: The latest head commit is from 2026-06-19 and the latest check activity completed on 2026-06-20, so the branch has had no new commit or check activity for more than 14 days. (3823d5468484)

Likely related people:

  • steipete: Peter Steinberger introduced the bundled browser executable module and later moved browser runtime and doctor seams behind plugin metadata, both central to this path. (role: browser plugin ownership contributor; confidence: high; commits: 8eeb7f082975, 471d056e2f0d; files: extensions/browser/src/browser/chrome.executables.ts, extensions/browser/src/doctor-browser.ts)
  • vincentkoc: Current blame on the version reader and doctor warning path points to Vincent Koc's recent browser doctor race/release work carrying this surface on main. (role: recent area contributor; confidence: medium; commits: fd2e4da00651, e085fa1a3ffd; files: extensions/browser/src/browser/chrome.executables.ts, extensions/browser/src/doctor-browser.ts)
  • joshavant: Josh Avant consolidated the browser host-inspection facade that exposes readBrowserVersion outside the immediate doctor caller. (role: adjacent facade owner; confidence: medium; commits: 33ad806a14ef; files: src/plugin-sdk/browser-host-inspection.ts, extensions/browser/browser-host-inspection.ts)
  • Anmol Ahuja: History shows adjacent Windows executable path selection work in the same browser executable module. (role: adjacent Windows executable discovery contributor; confidence: low; commits: c40884d306e8; files: extensions/browser/src/browser/chrome.executables.ts)

Codex review notes: model internal, reasoning high; reviewed against 286d0b9fb340.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels May 27, 2026
@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@clawsweeper

clawsweeper Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

@Jefsky thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward.

Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive.

Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openclaw doctor reports "Could not determine the installed Chrome version" despite Chrome 148 installed at expected path

2 participants