-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Webdriver timed out in container #96
Comments
Thanks for filing this issue. Does this issue happen repeatedly or just once? I added better resistance to random webdriver initialization errors in the next version (will be released soon). If it just happens every once in a while, this added resistance should make this a non-issue |
It is happening repeatedly. Strangely, I do recall this version of the container working. So I'm not sure what has changed on the local container. Is the bundled chrome version able to auto update? |
It shouldn’t as long as you don’t specify a chrome version in your config file (that is handled in the Docker container itself) |
I just tried on the Could you also try the |
I haven't set the chrome version in the config file. So I'm just using the bundled version. I tried the
|
Hey @pldimarco, do you have another machine you could test on to see if you get the same issue? |
Yeah, I tried it out on my laptop and it worked fine. So on to debugging how a stable image went from working to not working, since the issue occurred before the last release. Seems something with my unraid host then. |
I'm experiencing the same thing with my container, webdriver will timeout 3 times then hard fail.
|
It seems that starting the container in |
I'm getting similar results on |
Confirmed that setting |
That's good to know that running with a privileged container works around this issue. Since I am not able to reproduce this issue, would you guys be able to manually add some code to see if this issue is solved? If not, I can push a new image with these fixes to which you can test. On line 207 of options.add_argument("--disable-gpu")
options.add_argument("--disable-extensions")
options.add_argument("--dns-prefetch-disable") To add this in the Docker image, you can first run the following command: Then, exec into it by doing You can edit the file by using |
@jdholtz I tried out the instructions with a config file and verbose on. And while it does get further, it still seems to fail. Run logs:
Given the error, is there a way to grab a screenshot on failure? I wonder if the page isn't rendering correctly with the new options. |
Yes, you can grab a screenshot at any point with It seems like the initial timeout issue is solved, but it just doesn't load the page elements. Have you tried to use each of the new options I suggested individually? You may only need one of them to fix the original issue and this new timeout my be the cause of an option not needed. |
same issue, --privileged fixed it. |
Is everyone who has this issue running the Docker container on an Unraid host? pldimarco and stephenpapierski appear to be so maybe there is a conflict between this script and Unraid hosts. |
I’m running it on a standard Ubuntu 22.04.1 LTS installation using docker run and portainer for managing my containers |
Ubuntu 22.04.2 LTS |
Hey @pldimarco, any updates to my comment here? |
I tried one additional flag at a time and no one flag worked. I didn't try the combinations of 2 flags. But three flags has gotten it to I wasn't able to grab a screenshot. Because while I got past the |
That makes sense. Thanks for trying. Would you be able to try something else so we can see if this issue is directly with the Chromedriver or with this script? Enter the Docker container and type from seleniumwire.undetected_chromedriver import Chrome, ChromeOptions
options = ChromeOptions()
options.add_argument("--headless=new")
driver = Chrome(driver_executable_path="/usr/bin/chromedriver", options=options)
driver.get("https://mobile.southwest.com/check-in") If it finishes without timing out, then it is most likely due to the configuration this script uses. |
I put the code into a script and ran it. And it just hanged. So I put prints between each step, so my script looked like:
And the last I saw was |
I really appreciate you taking your time to debug this. Unfortunately, this means the issue doesn’t directly have to do with this script as the issue is reproducible without using this script at all. Currently, I’m not sure how to debug this further. You (or anyone else having this issue) can try to test the Selenium Docker Image (for Chrome) to see if you still receive a timeout. That repository has also fixed some timeout issues too, so it might be worth it to try to exec into the Southwest script image and do |
I'm also having this issue running on mac os. It was working before, then I updated it and now it's not. I'm not sure how to fix it. |
Hey @wootwoot1234, it seems like running the Docker container with the |
@jdholtz thanks, running it as a docker image worked great except I couldn't get it to load my config file so I had to pass it the username/passwrod as ARGS. BTW, the docs could be a little clearer. I wasn't clear to me that I was supposed to replace |
Good to hear. The paragraph below the Thanks for your note on the |
Has anyone that is running into this issue tried my suggestions here? |
Hey @jdholtz. I went to try out your suggestions here as I was traveling for a bit and I now cannot reproduce the issue. So I disabled |
That’s good to hear but strange why this issue has unknowingly disappeared. Thank you for all the debugging you’ve done for this issue! |
Since this issue is resolved for the author and no one else has reported back that the issue still occurs for them after trying my suggestions above, I will close this. If you are still running into this issue (even after my suggestions), please either comment on this issue or open a separate issue. |
Im running into this issue doing a direct install on Ubuntu 22.04.
|
@txssseal do you have a Chromium browser installed (such as Google Chrome)? If so, you can try adding the absolute path of your chromedriver location to the config.json option |
I was able to run the above, but I think you're missing the line that times out,
I get the timeout again, and looking at the response, it seems the headers are being rejected, so that element is never found:
|
This timeout happens at different places for everyone affected by the issue (the OP timed out when initializing Chrome, for example). I'm not able to reproduce this, so it appears to be a network issue that people run into every so often (maybe Southwest has something to do with this, but I'm doubtful). For reference, I am using Chrome v116 (with the workaround in the pinned issue), but I don't know what else could be causing this. It appears to go away for people who run into this issue eventually because no one has reported that they are still running into the timeout. |
Good point, for me it just happens to be the 502 error. If you have more debugging ideas, or logs I can capture I can help debug this. I have set my chrome to v114 but will try 116 after reading the workaround. |
It could be a selenium-wire issue. You can try to replace the import statement with |
Thanks, that led me on the right path as the error message was more useful and raised up. Turns out it was higher up the stack and a docker network/DNS resolution issue. |
@jdholtz , Just thought I'd mention that now a few months later (and doing a pull of the latest container), running it still requires --privileged to work. |
Thanks for the update. I still haven’t run into this issue at all. What OS are you running? |
Ubuntu Server 22.04.3 LTS
…On Wed, Dec 20, 2023, 7:21 PM Joey Holtzman ***@***.***> wrote:
running it still requires --privileged to work.
Thanks for the update. I still haven’t run into this issue at all. What OS
are you running?
—
Reply to this email directly, view it on GitHub
<#96 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AENAV7DPLFR5C5GXS2SOCQTYKN6H3AVCNFSM6AAAAAAYV5R542VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVGMYDONZTGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
Using the latest (4.0) docker container, when I start the container, the webdriver session times out.
To Reproduce
Expected Behavior
Flight scheduled/monitored
Version
Auto-Southwest Check-In v4.0
Additional context
Logs:
The text was updated successfully, but these errors were encountered: