persistent_local_browser broken on Windows: signal.SIGTERM and start_new_session are POSIX-only
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start in persistent_local_browser.py at the process creation logic around lines 141-142 and the release termination logic around line 187. Check the Windows subprocess behavior and the existing release command, then verify that a Chromium session survives the parent exit and that release terminates it without an AttributeError.
Written by the indexing model from the issue text.
Description
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)
- Dominant language
- Python
- Stars
- 6k
- Forks
- 385
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/Webwright
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in microsoft/Webwright
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100