persistent_local_browser broken on Windows: signal.SIGTERM and start_new_session are POSIX-only
还没有人认领这个 Issue。
评估
调研方向
从 persistent_local_browser.py 中第 141-142 行附近的进程创建逻辑,以及第 187 行附近的 release 终止逻辑开始。检查 Windows 子进程行为和现有的 release 命令,然后验证 Chromium 会话在父进程退出后仍能存活,并且 release 能在不产生 AttributeError 的情况下终止它。
由索引模型根据 Issue 内容生成。
描述
Description
persistent_local_browser.py has two Windows incompatibilities that prevent the tool from working on Windows:
-
signal.SIGTERMnot available on Windows (line 187):os.kill(pid, signal.SIGTERM)raisesAttributeErrorbecausesignal.SIGTERMis a Unix-only constant. Thereleasecommand crashes. -
start_new_sessionis POSIX-only (line 141-142): The process detach logic only applies on POSIX. On Windows, the Chromium subprocess is not detached from the parent, so it gets killed when the parent exits - making the "persistent" browser feature non-functional.
Impact
- The entire
persistent_local_browsertool is broken on Windows _cmd_releasecrashes withAttributeErrorwhen trying to terminate a browser- Persistent browser sessions cannot outlive the creating script on Windows
- Error message is a cryptic Python traceback, not a helpful diagnostic
Suggested Fix
Add Windows code paths:
- For process detach: use
creationflags=subprocess.CREATE_NEW_PROCESS_GROUPon Windows - For termination: use
taskkill /F /T /PIDon Windows as an alternative toos.kill(pid, signal.SIGTERM)
- 主要语言
- Python
- 星标
- 6k
- 派生
- 385
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/Webwright 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 1/5 1 小时以内 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 45/100
查看 microsoft/Webwright 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 70/100
huggingface/Repo2RLEnv#163 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
难度 2/5 1-3 小时 新手友好度 70/100
NousResearch/hermes-agent#121143 ·