-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Chrome not reachable with Selenium Python #133
Comments
I'm experiencing the same issue but using node 6.10. Using the chrome binary given with this project : https://github.com/blackboard/lambda-selenium |
After a lot of tooling around, I got it to work on Lambda. The problem was with incompatible versions of serverless-chrome, chromedriver, and Selenium. These are the versions that play well together in Lambda. Why is beyond me: chromedriver v.2.37 |
Thanks for the quick feeback @robroc . I'm going to update the chromedriver to 2.37 and check if it works. |
@robroc it works 💃 Is there any document where we have the correlation between chromedriver and chrome itself? Edit: Everything is written on the chromedriver page: https://sites.google.com/a/chromium.org/chromedriver/downloads Maybe a warning on the documentation of serverless-chrome could be a good point for troubleshooting? |
@robroc |
Suggested in #133. Adds a note about incompatible versions of selenium, chromedriver
Added a note to the docs. |
Did anyone look into investigating why we can't use newer versions of Chromium? Seems like pinning on such old versions works up until you want a new feature! cc: @robroc @adieuadieu |
This is related to the chromedriver itself |
Just for an additional data point, leaving chromedriver at 2.37 (which claims to support Chrome v64-66), and switching to v1.0.0-41 (Chromium 65.0.3282) of this project triggers the error. The version of selenium itself seems to have no impact (as suggested earlier). |
Found some time to do a little more digging. The only error in the chromedriver log that jumps out at me is
Anyone smarter than I? Thanks! |
Can we now use newer versions of headless-chromium? Or still use the old version combination? |
@NikolaiT versions of chromium/chromedriver are tied in term of compatibility look here : http://chromedriver.chromium.org/downloads And check for the SUPPORT section of each chrome driver version to know which one fits your setup. |
Thank you @zekth for the reference. This combination of versions worked out: chromedriver 2.43 |
@marioavs It looks like chromedriver versions below 2.46 are no longer offered. Do you know if those versions of serverless-chrome and Selenium work with the offered versions? |
chromedriver versions below 2.46 are still available, for example chromedriver version 2.43 that I mentioned. Version 2.44 did not work for me, that is why I wanted to share the specific versions that did work in my tests. serverless-chrome 1.0.0-55 is built with chromium 69.0.3497.81 (stable channel) for amazonlinux:2017.03, that means it "should" work with chromedriver versions 2.41, 2.42, 2.43 and 2.44. |
I'm still facing this error. Did anyone stumble upon this?
|
This Combination works for me |
Which combination is working atm? I've tried driver v2.43 + serverless v1.0.0-55 and driver v2.37 + serverless v1.0.0-37, I keep getting an error: 'Chromedriver unexpectedly existed. status code was: 127' |
@ramisvik I'm still with this error, using headless chrome=69.0.3497.81, chromedriver=2.43.600233, selenium=3.14.0, did you manage to make it work?
|
Really difficult to get the combinations working. I switched to Scrapy + Splash which is much better. |
@AboveTheHeavens Have you found out the solution for this issue? I lost any hope to make it working. UPD: It is necessary to use python 3.6 |
@marioavs could you please clarify, what exact version of "severless-chrome 1.0.0-55" worked out for you? Did you use chromium 69.0.3497.81 (stable channel)? I am using:
Maybe the reason is the chromedriver? Is it possible that your 2.43 is not 2.43.600233? If so, can you please share your chromedriver somewhere in case if it's different? |
I have finally set it up! The combination is:
I've been getting the error "Chrome unreachable" because of
Its removal solved my problem. UPD: it works locally. but when I run it in AWS Lambda it raises the following error:
|
Did anyone got this to work with recent versions? D: |
Hi guys, just dropping a quick update from my side. I tried multiple versions but didn't find this sustainable. I went ahead and wrote the spiders in Splash handles most of my use cases perfectly well. |
Hey guys, spend last night fiddling with different versions and finally made it work. These version setup works for me: selenium==3.14.0 Initially I was using python 3.8 (both locally and on AWS) and it did not work. |
Hi @dmitrykvochkin could you perhaps copy-paste the contents of your requirements.txt? I'm still having issues getting the versioning right/figuring out what I need to include in the requirements file. This repository seems to specify chromedriver-binary==2.43 while this tutorial doesn't specify it at all. Tad confused what I need. Cheers. |
Hey @Denijar Make sure that you are building yours with python=3.6 on your machine and that the same python version is used on AWS Lambda. (this was giving me issues before) I hope this helps! |
My script worked well with
These binaries could be one lambda layer with this script. The test code is here. |
Well I tried it, but I get a problem of timeout. It's blocked at "get function". |
@mcharbonnier If you still get the same error,
I need more detail about this. |
Hello,
Finally the bug came from "https://google.com".
I tried with another site and it worked fine ;)
Thank you
Le jeu. 11 juin 2020 à 02:14, umihico <notifications@github.com> a écrit :
… @mcharbonnier <https://github.com/mcharbonnier>
Did you extend lambda timeout? The default value is 3 seconds which is not
enough.
If you still get the same error,
It's blocked at "get function"
I need more detail about this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APFRB6K7YZE7ZA5ZSXLDAA3RWAOVPANCNFSM4E25JUDA>
.
--
Maxence Charbonnier
|
@umihico thanks for sharing your result. it works fine. i located your files on i used |
@xoxwgys56 ECR is also possible. I am also trying to deploy with ECR in my project and could make it at least.
Due to the Dockerfile above, I need to locate binary files like this.
|
@umihico thanks so much your reply it will really helpful for me. This is another question but did you tried higher version of I guess this is issue about al1 and al2. but why? |
@xoxwgys56 |
@umihico |
@xoxwgys56
Please check out https://github.com/umihico/docker-selenium-lambda/ I am trying to upgrade any of these versions but can't make it yet. |
Did anyone manage to get this running on Python 3.8? |
@milanzivic |
Thanks! Will check it out |
https://github.com/adieuadieu/serverless-chrome/releases/tag/v1.0.0-55 chromium 69.0.3497.81 (stable channel) for amazonlinux:2017.03 thank
v1.0.0-55 v1.0.0-57 https://github.com/adieuadieu/serverless-chrome/releases/download/v1.0.0-57/stable-headless-chromium-amazonlinux-2.zip |
@duolabmeng6 posted version works fine but like what you said it takes more time. In this case, I wonder what is differences between each versions. I notice built image sizes are different but not sure it makes chrome more slower or heavier. |
I chose chrome 69 v1.0.0-55 because Aliyun 函数计算 Greater than is not allowed 100m And use less memory and time But I like to use the latest version If only he could use less memory and be faster For the time being, v1.0.0-55 is appropriate in the case of no bugs Build the latest version if chrome can be released The current chrome version is 91 I'd like to try the latest version. I'm in aliyun test |
@duolabmeng6 Thanks for replying. Yes I agree with that. P.S I don't know what aliyun test is. I just guess meaning of like alpha test or pre test |
https://www.alibabacloud.com/product/function-compute The results were tested on Alibaba cloud I don't know how to build the latest version of chrome 91. I still need to learn. Now I see the latest version is 88 v1.0.0-57 Because Alibaba cloud needs special processing for more than 100m, I chose version 69 v1.0.0-57 This makes it easier to deploy functions In function compute, memory requirements are obvious. It is easier to choose files with smaller speed and faster deployment If you choose a small memory without major problems If you use docker deployment, can use the latest version of chrome 91 It's bigger https://github.com/duolabmeng6/heroku_selenium The latest version of chrome built in heroku can also be tested My English is a translation. I'm sorry for the inaccurate expression |
Current requirements working for me: |
I'm using serverless-chrome with Python in Lambda, following this repo's instructions.
It works great locally in a Docker container, but not when deployed to Lambda. This error comes up. It seems the webdriver starts up fine but the binary is unreachable when asked to parse the DOM with Selenium.
This is the code leading up to the line that fails:
Any advice would be fantastic.
The text was updated successfully, but these errors were encountered: