headed chrome can't be quit from macOS dock and also blocks user from creating new chrome windows

未关闭
#44,180 5 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@pavelfeldman 已经在做这个了。

开始于 2026年11月18日。

  • #44191 来自 @microsoft-playwright-automation —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
playwright, typescript
领域
backend, desktop

调研方向

Start by tracing how headed sessions track page closure and how the daemon decides whether to close the browser; the issue does not name the relevant files or tests. Reproduce by quitting the last headed Chrome window from the macOS Dock and checking whether the daemon still reports the session open. Done means that this action ends the session without treating tab-close or page-initiated window.close() as session termination. An open pull request already addresses the issue.

由索引模型根据 Issue 内容生成。

描述

agent-triage milestone

playwright-cli open --headed on macOS.
right-click → quit on the dock icon closes the window, but the main Google Chrome process (launched with --remote-debugging-pipe --no-startup-window) stays alive, and the daemon still reports the session open (tab-list shows about:blank). Since headed sessions have no idle timeout, the windowless process stays indefinitely. Because it's the same app bundle as the user's Chrome, it also stops the user's regular Chrome from opening tabs until it's killed in Activity Monitor.

Happy to open a PR with a fix where, in headed mode, if the last page is closed by something other than a CLI command (e.g. the user quitting Chrome from the dock or closing its last window), the daemon treats it as the user ending the session and closes the browser. Pages closed by tab-close or by window.close() from a page would not trigger it.

主要语言
TypeScript
星标
100k
派生
6.9k
平均合并
16 小时 8 分钟
30 天内合并 PR
281

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/playwright 的其他 Issue

查看 microsoft/playwright 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。