Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

The extension works slowly or does not work at all if the tab is not focused #53

Open
Serega007RU opened this issue Jun 28, 2023 · 3 comments

Comments

@Serega007RU
Copy link

Serega007RU commented Jun 28, 2023

If the tab is not focused or the browser is minimized, the extension solving the captcha very slowly or does not solve it at all.

I started in debug mode to look and find out why this is happening and how I understood the main reason is that setTimeout and setInterval slow down and fire after at least 1000 ms if the tab is not focused, I learned about this from stackoverflow https://stackoverflow.com/a/6585153
According to the source code, I saw that you use Time.random_sleep() and Time.sleep() quite a lot, it looks like the extension is very delayed on these timers due to the fact that JavaScript increases them triggered to the 1st second.
I tested a little and removed the use of these timers altogether (I commented out the lines of code where these timers were used) and it seems to help, but I didn't test it completely, a little later I will test it even longer.

I ask you to take a look and devote time to this problem, despite the fact that it is specific and mainly concerns only me

Why do I need to solve captchas in the background at all? I have developed my extension for a browser that automatically votes on on monitoring sites https://github.com/Serega007RU/Auto-Vote-Rating, to vote there you need to pass a captcha. My extension opens an unfocused tab by default so as not to distract the user, so it is important for me that the captcha can be solved completely in the background without disturbing the user.

@Wikidepia
Copy link
Owner

Yeah, I noticed this too but has not been bothered to fix it. Thanks for the links will check later

@bettonna
Copy link

bettonna commented Jul 2, 2023

yes nice point, it's not working at background, need focus tab or page, :((

@Beautiful-Gallery
Copy link

please sir solve The extension works slowly or does not work at all if the tab is not focused issue

Serega007RU added a commit to Serega007RU/hektCaptcha-extension that referenced this issue Oct 1, 2023
Serega007RU added a commit to Serega007RU/hektCaptcha-extension that referenced this issue Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants