Repository navigation
fix(cli): suggest only a Chrome path that exists when the browser download fails - #6954
Merged
Merged
Conversation
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 105 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
Contributor
There was a problem hiding this comment.
Approve at 87b9cb91.
The hint now uses findSystemBrowser() instead of a hard-coded per-platform path. It can only name a file that existsSync found or that which/where returned, so it never names a dead path. With no Chrome installed it drops the export line and says to install Chrome first.
- Fails-without-fix line. It names
offers no path to export when no Chrome is installed…. The old code always emittedexport HYPERFRAMES_BROWSER_PATH="…", so that test fails without the fix. - Tests are hermetic.
beforeEachresets modules and mockschild_process, sowhich google-chromeon a CI runner that has Chrome can't leak into the "none installed" cases.SYSTEM_CHROME_PATHSis re-evaluated per platform aftersetPlatform. - When each hint shows. The "installed" hint only appears on the
preferManagedChromepath, because otherwise a system Chrome would already have been used. The test covers that.
Nits, not blocking:
- The suite comment above
failInstallstill says the linux case exercisesbrowserPathHintForPlatform, which this PR deletes. - On win32 with Chrome installed, the hint still prints POSIX
exportsyntax. That predates this PR.
CI: Producer: unit tests failed on renderOrchestrator.stall.test.ts › retries a stalled attempt on fewer workers…. This PR only touches packages/cli, and main is green, so I read it as a flake. It needs a rerun before merge.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 1, 2026
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When the Chrome download fails, the hint told people to
export HYPERFRAMES_BROWSER_PATH=...with a made-up default path. If that file does not exist, setting it makes every later run hard-fail with "is set to X, which does not exist".The hint now names the Chrome actually found on the machine, or, when none is installed, says no Chrome or Chromium was found and offers no path to export.
Why
Reproduced by blocking the download host and running
hyperframes browser ensure, then following the hint.Test
Rewritten hint tests: with an installed Chrome (darwin, linux) the hint carries the real path; with none (darwin, linux, win32) it carries no export line. 75 tests pass 3 runs in a row.
fails without the fix: packages/cli/src/browser/manager.test.ts › downloadBrowser — install failure surfaces HYPERFRAMES_BROWSER_PATH hint › offers no path to export when no Chrome is installed, so a dead override is never suggested (darwin, linux, win32)
Size
Under 100 changed source lines; the rest is the rewritten tests.