-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Description
There is an issue where Chrome processes are not fully terminated when the sysQuit function in Utils.py is called. Because these orphaned processes continue to run in the background, EsportsHelper cannot be restarted successfully unless the user manually terminates the remaining "Google Chrome" processes in the Task Manager.
Symptoms
- After calling
sysQuit, multiplechrome.exeprocesses remain visible in the Task Manager. - Upon restarting the program, it often gets stuck in an infinite loading state.
Technical Context
This issue appears to be a known characteristic of undetected-chromedriver. While standard Selenium's driver.quit() usually cleans up well, undetected-chromedriver sometimes leaves "zombie" processes due to its unique way of patching the driver and managing the browser instance.
I have researched this issue but haven't found a definitive way to terminate only the specific Chrome instances opened by EsportsHelper without affecting the user's other personal Chrome browsers. Simply using a global taskkill or psutil logic based on the process name (chrome.exe) is not a viable solution as it would close all of the user's active browser windows.
References
I have looked into the following resources regarding this UC-specific behavior:
- driver.quit() does not end the Chrome process fully ultrafunkamsterdam/undetected-chromedriver#1836
- https://stackoverflow.com/questions/77507393/undetected-chromedriver-quit-issue
Proposed Goal
We need to improve the sysQuit logic to accurately track and terminate the specific PIDs (Process IDs) associated with the driver instance and its child processes to ensure a clean exit without interfering with other system processes.