ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
9.73k stars 1.14k forks source link

Chrome din't completes the process in windows #1767

Open RussianPostman opened 7 months ago

RussianPostman commented 7 months ago
image

After successful completion of any program using undetected-chromedriver, the Chrome process remains. This process consumes a lot of CPU resources and does not do anything visible. driver.quit() closes the window, but the process remains and continues to consume resources. How do I shut down the program correctly? This problem is only with undetected-chromedriver

0x1991 commented 5 months ago

The only way I fixed this issue was calling close() before quit() like:

driver.close()
driver.quit()
kim-chung-man commented 4 months ago

I too am experiencing the same thing. I tried the above suggestions, but it didn't solve the problem.

fthmko commented 2 months ago

In my case, two process keep running after driver.quit(). I found os.kill(chrome-pid, 15) will got this result, even chrome is started from the icon.

However, windows command taskkill /pid chrome-pid works perfect. So this is my solution:

os.system("taskkill /pid " + driver.browser_pid)
while psutil.pid_exists(driver.browser_pid):
    time.sleep(0.1)
driver.quit()