FlareSolverr / FlareSolverr

Proxy server to bypass Cloudflare protection
MIT License
5.99k stars 533 forks source link

Chrome.exe (v124) processes keep running on background #1161

Closed andtoliom closed 1 week ago

andtoliom commented 1 month ago

Have you checked our README?

Have you followed our Troubleshooting?

Is there already an issue for your problem?

Have you checked the discussions?

Environment

- FlareSolverr version: 3.3.17
- Last working FlareSolverr version: 3.3.16
- Operating system: Windows 11
- Are you using Docker: [yes/no] no
- FlareSolverr User-Agent (see log traces or / endpoint): Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
- Are you using a VPN: [yes/no] no
- Are you using a Proxy: [yes/no] no
- Are you using Captcha Solver: [yes/no] no
- If using captcha solver, which one:
- URL to test this issue: any

Description

Chrome processes remain active in the background and are never closed, they accumulate until the computer crashes. Flaresolverr is not terminating the processes once it solves the CF challenges. This is happening since the new version of chrome v124. Before it worked perfectly.

Logged Error Messages

No logs messages.

Screenshots

c52b2235cf0692b6b0b16aeea7857abe

ilike2burnthing commented 1 month ago

If you use the v3.3.17 precompiled binaries (with v123 Chromium), does the issue not occur?

andtoliom commented 1 month ago

Yes works, but I need to use Chrome v124

ilike2burnthing commented 1 month ago

Why specifically v124?

andtoliom commented 1 month ago

Why specifically v124?

I use some chrome extensions and I have to edit the source code to load a custom chrome profile

ilike2burnthing commented 1 month ago

Yea, this seems to be specific to Chrome v124, as it affects v3.3.16 too.

You can uninstall Chrome v124 and install v123 instead in the mean time - https://filecr.com/windows/google-chrome/?id=544228864100

andtoliom commented 1 month ago

Yea, this seems to be specific to Chrome v124, as it affects v3.3.16 too.

You can uninstall Chrome v124 and install v123 instead in the mean time - https://filecr.com/windows/google-chrome/?id=544228864100

Thank you! I will work with v123 till there is a solution for new Chrome versions

ilike2burnthing commented 1 month ago

Alternatively, build your own binaries, which will use Chromium v123:

python src/build_package.py

Then you can reinstall Chrome normally, so you're not stuck on v123.

asulwer commented 2 weeks ago

chrome v124+ is effected. v126 has the same issue

asulwer commented 2 weeks ago

Why specifically v124?

this is off topic and should be marked as such. not relevant.

ilike2burnthing commented 2 weeks ago

Aaron, stop being confrontational for no reason, it's getting boring.

asulwer commented 2 weeks ago

Aaron, stop being confrontational for no reason, it's getting boring.

this, again, is off topic and not relevant to the issue. make real contributions, not close issues because you do not have the aptitude to deal with them

RileyXX commented 1 week ago

I'm having this issue as well. Took me a while to track it down to Flaresolverr that was causing it. It's using a lot of resources and generally slowing down my computer just running in the background. I was gaming and getting insane lag and stuttering as well as packet loss and desyc, opened task manager to find chrome process hogging up tons of resources. I just used task manager to end the process but finally couple weeks later I took some time to look into it and discovered it was happening after flaresolverr started running.

Is flaresolverr using chromedriver? If so I had this issue as well where chromedriver was not exiting properly when calling driver.quit() in one of my chromedriver projects. I had to use driver.close() and then call driver.quit() in order to prevent background processes from continuing to run when using chromedriver. This was a new issue that I discovered with recent chrome versions. I wonder if this is what's happening with flaresolverr?

05-19-2024_604
RileyXX commented 1 week ago

After looking into flaresolver code I can confirm the issue I was talking in my above comment.

https://github.com/search?type=code&auto_enroll=true&q=repo%3AFlareSolverr%2FFlareSolverr+driver.quit

As you can see driver.quit() is being called without driver.close() before it thus causing the chrome background processes to continue to run. I will run a test shortly and see if adding driver.close() fixes it.

RileyXX commented 1 week ago

After running a test for around 10 minutes after adding driver.close() before driver.quit() the chrome process is still running. Adding driver.close() solved this issue in my other chromedriver project on recent chrome versions so it's odd that it's not working here.

Is flaresolverr intentionally keeping a chrome window open indefinitely in the background?

asulwer commented 1 week ago

after an issue with a supposed contributor i moved away from this project to a much better one.

https://github.com/omkarcloud/botasaurus

ilike2burnthing commented 1 week ago

https://github.com/FlareSolverr/FlareSolverr/commit/5a2c61601e756438241df3b0b1eb7cb1807233fc working well for me.

v3.3.18

RileyXX commented 1 week ago

Looks like when I attempted to test it earlier I forgot to turn off my auto updating script and it undid my changes.

Can confirm with the addition of driver.close() the fix does seem to be working for me as well. Very cool! Thanks for the implementation!