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
9 changes: 8 additions & 1 deletion src/nova_act/cli/browser/services/session/chrome_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,21 @@ def _validate_browser_executable(self, executable_path: str) -> None:
if not os.access(executable_path, os.X_OK):
raise RuntimeError(f"Browser executable is not executable: {executable_path}")

# On Windows, running `chrome.exe --version` when Chrome is already running
# opens a new browser window instead of printing version info. Check the
# executable path first to avoid this side effect.
path_lower = executable_path.lower()
if any(indicator in path_lower for indicator in ["chrome", "chromium", "edge"]):
return

try:
result = subprocess.run(
[executable_path, "--version"],
capture_output=True,
text=True,
timeout=DefaultBrowserConfig.BROWSER_VERSION_CHECK_TIMEOUT_SECONDS,
)
version_output = result.stdout.lower()
version_output = (result.stdout + result.stderr).lower()
is_chromium = any(indicator in version_output for indicator in ["chrome", "chromium", "edge"])
if not is_chromium:
raise RuntimeError(f"Browser is not Chromium-based: {executable_path}")
Expand Down