getgauge / taiko

A node.js library for testing modern web applications
https://taiko.dev
MIT License
3.56k stars 452 forks source link

Browser processes do not terminate on Windows with Chrome(ium) version 126 and above #2732

Closed winst0niuss closed 1 month ago

winst0niuss commented 1 month ago

Using Chromium version 120.xxxx with Gauge and Taiko on Windows worked correctly. However, after upgrading to Chromium version 126.xxxx, it has been noticed that Chromium processes do not terminate after running tests on CI, leading to excessive resource consumption on the machine.

To address the issue, a stable build of 'Chrome for testing' was used, but the problem persisted.

Steps to Reproduce: Install Chrome version 126 or higher. Create and run a simple test several times. Open Task Manager and note the active Chrome processes that remain. Try to delete the node_modules folder to verify that the processes have indeed not ended (deletion will be blocked).

Expected Result: Chrome processes should correctly terminate after test execution.

Actual Result: Chrome processes remain hanging in the system, which blocks folder deletion and excessively consumes system resources.

Software Used: Taiko: 1.3.10 Operating System: Windows 10 Node.js: v18.18.2

Link to download the used version of Chrome: https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.126/win64/chromedriver-win64.zip

zabil commented 1 month ago

Thanks for reporting this. This issue is reproducible on our CI servers too.

For example https://github.com/getgauge/taiko/actions/runs/9888600193/job/27313003180

Not able to find the exact cause. But it looks like some regression in chrome version. Does it happen for a specific kind of test in your case?

winst0niuss commented 1 month ago
block process

Occurs even with a simple test, for example: Open browser Go to page Click on the random button

I go down the versions and 125.0.6422.141 - the problem is present

PS: IMHO, I'm not very knowledgeable in this area, but could the Chromium API for closing the browser have changed starting with version 125?

zabil commented 1 month ago

Ok. Looks like upgrading the chrome for test version solves this. The #2730 is now passing with the following bump in version

https://github.com/getgauge/taiko/pull/2730/commits/a980406369e578e00c3287d4484b17477ff9b438#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

Will look at making a new release.