Repository navigation
fix(browser): read Windows Chrome version from build dir in doctor - #87937
Conversation
|
@MukundaKatta 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. |
Read PE ProductVersion before a conservative unambiguous install-layout fallback, without interpolating configured paths into PowerShell code.\n\nCo-authored-by: Mukunda Rao Katta <mukunda.vjcs6@gmail.com>
f5affd4 to
e98cd25
Compare
|
Land-ready proof for source head
Known proof detail: the first broad native-Windows test invocation exposed three pre-existing POSIX-only test-fixture assumptions (a macOS Plist path and two Implementation: |
…penclaw#87937) * fix(browser): read Windows Chrome version metadata Read PE ProductVersion before a conservative unambiguous install-layout fallback, without interpolating configured paths into PowerShell code.\n\nCo-authored-by: Mukunda Rao Katta <mukunda.vjcs6@gmail.com> * style(browser): clarify Windows version probe * fix(browser): use trusted Windows PowerShell path --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>

Summary
openclaw doctoron Windows reportsCould not determine the installed Chrome version. Chrome MCP requires Google Chrome 144+ on this host.even when a supported Chrome (e.g. 148.0.7778.179) is installed at the standard path and the browser tool itself connects and works fine. See [Bug]: openclaw doctor reports "Could not determine the installed Chrome version" despite Chrome 148 installed at expected path #87312.readBrowserVersion()resolves the version by runningchrome.exe --version. On macOS/Linux that prints the version to stdout, but on Windows the GUI binary does not attach to the parent console, so--versionproduces no stdout and detection returnsnull.win32branch toreadBrowserVersion()that reads the version from the Chromium install layout (the newest siblingApplication\<version>build directory), falling back to the executable's file metadata via PowerShellProductVersionfor non-standard/portable layouts. This mirrors the existingdarwinbranch, which already reads the app bundleInfo.plistinstead of--version.readWindowsBrowserVersion()helper and thewin32branch inreadBrowserVersion()inextensions/browser/src/browser/chrome.executables.ts.Linked context
Closes #87312
Was this requested by a maintainer or owner? No; community bug report.
Real behavior proof (required for external PRs)
pnpm test extensions/browser/src/browser/chrome.version.test.tspnpm test extensions/browser/src/doctor-browser.test.tspnpm tsgo,oxlint,oxfmt --checkon the touched fileson Windowsunit tests inchrome.version.test.tsstubprocess.platform = "win32"and build a real temporary directory mirroring theApplication\<version>install layout. They assert thatreadBrowserVersion():powershell.exe ... (Get-Item -LiteralPath '<exe>').VersionInfo.ProductVersionwhen no version directory exists;nullwhen neither signal is available.chrome.version.test.ts6 passed;doctor-browser.test.ts11 passed;tsgo0 errors;oxlint0 errors;oxfmt --checkclean.readBrowserVersion()returns e.g.148.0.7778.179, soparseBrowserMajorVersion()yields148 >= 144and doctor would not emit the warning.chrome.exe; the fallback is covered via a mockedexecFileSync.ProductVersionfallback are validated by unit tests and the well-documented Chromium-on-Windows--versionbehavior rather than a live run. Live confirmation on a Windows host would strengthen this PR; happy to adjust if a maintainer can reproduce.