Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/browser_harness/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,20 @@ def _open_chrome_inspect():
return
except Exception:
pass
if platform.system() == "Windows":
# ShellExecute can't resolve chrome:// URIs (no protocol handler -> MS Store
# dialog); pass the URL as an argument to the Chrome binary instead.
for chrome in (
os.path.expandvars(r"%ProgramFiles%\Google\Chrome\Application\chrome.exe"),
os.path.expandvars(r"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"),

@cubic-dev-ai cubic-dev-ai Bot Jun 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Windows Chrome path lookup misses %ProgramW6432%, causing the fix to silently fail on 32-bit Python running on 64-bit Windows with 64-bit Chrome installed.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/browser_harness/admin.py, line 738:

<comment>Windows Chrome path lookup misses `%ProgramW6432%`, causing the fix to silently fail on 32-bit Python running on 64-bit Windows with 64-bit Chrome installed.</comment>

<file context>
@@ -730,6 +730,20 @@ def _open_chrome_inspect():
+        # dialog); pass the URL as an argument to the Chrome binary instead.
+        for chrome in (
+            os.path.expandvars(r"%ProgramFiles%\Google\Chrome\Application\chrome.exe"),
+            os.path.expandvars(r"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"),
+            os.path.expandvars(r"%LocalAppData%\Google\Chrome\Application\chrome.exe"),
+        ):
</file context>
Fix with cubic

os.path.expandvars(r"%LocalAppData%\Google\Chrome\Application\chrome.exe"),
):
if os.path.exists(chrome):
try:
subprocess.Popen([chrome, url])
return
except Exception:
pass
try:
webbrowser.open(url, new=2)
except Exception:
Expand Down