Skip to content

(fix) : MacOs chrome for testing not closing#38

Open
MoonLGH wants to merge 4 commits into
QuestPilot:mainfrom
MoonLGH:main
Open

(fix) : MacOs chrome for testing not closing#38
MoonLGH wants to merge 4 commits into
QuestPilot:mainfrom
MoonLGH:main

Conversation

@MoonLGH

@MoonLGH MoonLGH commented Jun 11, 2026

Copy link
Copy Markdown

No description provided.

MoonLGH added 2 commits June 11, 2026 22:43
Signed-off-by: Farrel Athaillah <MoonLMC1212@gmail.com>
@HIK-506

HIK-506 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR and for digging into the macOS "Chrome for Testing" process not exiting — that's a real issue, and
awaiting the close with a timeout guard (closeWithTimeout) is a genuinely good idea. A few things need to be addressed
before this can be merged:

  1. The branch is out of date with main. Most of the PageController changes in this diff (the getDashboardDataFromHtml
    extraction, the multi-line logging, the parsed.filter().join() reflow) already exist on main. Please rebase/merge main
    into your branch — right now the diff conflicts with code that's already shipped, which makes it impossible to review
    the actual fix.

  2. As written, this regresses assertBundledChromiumAvailable(). On main that method launches a test browser, closes
    it, and has a catch that throws a helpful "run npx patchright install chromium" message. The version in this PR drops
    the .close() and the catch — that leaks a browser and loses the error handling. This looks like a merge artifact;
    rebasing should resolve it.

  3. The parent browser is already closed elsewhere — let's not close it twice. In BrowserManager.createBrowser, the
    context already has:
    context.once('close', () => {
    this.activeBrowsers.delete(browser)
    void browser.close().catch(() => {})
    })
    plus activeBrowsers tracking and a closeAll(). Your change calls context.close() and then browser.close() directly in
    closeBrowser, so browser.close() ends up being invoked twice. Rather than duplicating, please build on the existing
    mechanism — e.g. keep the closeWithTimeout improvement by making that context.once('close') handler (or closeAll)
    await the close with the timeout, instead of the current fire-and-forget void browser.close(). That fixes the
    lingering-process race in one place.

  4. Please keep the PR scoped to the fix. The dashboard/logging reformatting is unrelated to "browser not closing" and
    should drop out once you rebase. A focused diff is much easier to review and safer to merge.

  5. How was this tested? Since the fix targets macOS specifically, could you share how you verified it (e.g. confirming
    no Google Chrome for Testing processes remain after a run)? We don't have a macOS CI runner, so your repro steps help
    a lot.

Once it's rebased on main, scoped down to the close logic, and the closeWithTimeout guard is wired into the existing
close path, I'd be happy to take another look. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants