-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TimoutException after few searches #185
Comments
I was getting this same error (though only on mobile searches), and this fix worked for me in searches.py (lines 171-173): try:
searchbar = self.browser.utils.waitUntilClickable(
By.ID, "sb_form_q", timeToWait=40
)
except TimeoutException:
logging.debug("TimeoutException")
self.browser.utils.goToSearch()
return The idea is to just gracefully fail when this happens - the |
I did something similar to try and fix it. Unfortunately I was getting http2 errors after a few errors got caught. Disabling http2 with the |
Me too. I first tried increasing timetoWait, but did not help. I will try both of these solutions. Suggest doing a PR if they work. Edit, tried both of your suggestions and still got errors. I caught timeout error, but it just looping until it crashed. For me, the timeouts are intermittent in each run, so these fixes appear to work but then don't. |
This works, the script is not crashing with the mentioned error(s). However, as @jdeath said, it just creates a loop of a search attempt at some point, trying the same search term over and over again while failing it every single time. |
edit: Didn't work today. Got into endless TimeoutException loop... I finally had it complete all searches on first try and successfully continued through a timeout exception. It is based on @mshancock code. Making a new window is what allowed it to not get stuck in an endless timeout loop. Could close the old tab, but I did not bother. I did not need to add Only worked once, but I will keep testing, I'll do a PR if keeps working searches.py:
utils.py, add a function:
I also added to browser.py browserSetup, but I am not sure if it was necessary.
Function names should probably be changed. I first tried to make a new tab using the existing functions in utils.py, but did not work. I then found the line of code I needed in the selenium documentation. Could change 'window' to 'tab' to see if still works. |
I've added #195 and #194, in the process i realized having both config-private.yaml and config.yaml was unnecessary, so now config.yaml is automatically ignored and only config.yaml.sample should be committed, the user should manually rename the file after configuring it as instructed in the updated README I was getting the same problem as #185 so i tried using the --disable-http2 flag and it seems to have fixed the issue i've also kinda fixed the ipapi ratelimited, it will still happen but now it instead of always using US as the default it will use the user configured country code, this does not block searches anymore for that day, the language is useless since its just the browser language, default will still be 'en'
This issue is stale because it has been open for 14 days with no activity. |
Before submitting a bug report...
This bug wasn't already reported.
(I have checked every bug report on GitHub)
I've cleared the sessions folder.
Title
Branch
develop
Commit
750fa7a
Describe the bug
The first searches work as expected, but after a few searches, I get the error below. The browser is on the rewards dashboard, loading forever, resulting in a TimeoutException after about 5 minutes of waiting. It seems like it tries to go to the page of the last search term ("hertha bsc") to start the next search but fails to do so for some reason. Manually refreshing the page returns it to the rewards dashboard, crashing the program.
Copy and paste your error
Screenshots
Value of dashboard variable
N/A
The text was updated successfully, but these errors were encountered: