Skip to content

Fix Windows OSError on Chrome driver cleanup - #113

Open
fl-99 wants to merge 1 commit into
leonboe1:mainfrom
fl-99:main
Open

Fix Windows OSError on Chrome driver cleanup#113
fl-99 wants to merge 1 commit into
leonboe1:mainfrom
fl-99:main

Conversation

@fl-99

@fl-99 fl-99 commented Aug 2, 2026

Copy link
Copy Markdown

I had an issue coming up when executing the original script. This PR aims to fix that.

Introduce a _ChromeDriver subclass that silences OSError winerror=6 (ERROR_INVALID_HANDLE) raised by undetected-chromedriver on Windows when its destructor retries cleanup after the wait handle is already closed.

Also remove the inline driver.quit() calls in shared_key_flow.py that were triggering the error path before the driver's lifecycle was fully managed.

Introduce a _ChromeDriver subclass that silences OSError winerror=6 (ERROR_INVALID_HANDLE) raised by undetected-chromedriver on Windows when its destructor retries cleanup after the wait handle is already closed.

Also remove the inline driver.quit() calls in shared_key_flow.py that were triggering the error path before the driver's lifecycle was fully managed.
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.

1 participant