Imagine you have this awesome web app that will make you very rich someday. This app has some end-user tests. You used Selenium to automate all the...
For further actions, you may consider blocking this person and/or reporting abuse
I am getting this error my dude:
Hmmm I have just tried re-doing this tutorial on a new lambda function but I was not able to replicate this issue. So in Docker it works fine, but the issue appears only after upload to lambda?
What is the exact selenium-webdriver gem version that you're using?
Hey, I used the exact same version used in this tutorial, but it looks like they changed headless chrome a little bit. Anyways whatever the case I managed to make it work by adding --disable-dev-shm-usage to the Selenium Chrome options.
You should update the tutorial to include this option.
Ok, I will. Thanks for your comment
My code does not work... :(
Chrome81.0.4044.138
stable-headless-chromium-amazonlinux-2017-03.zip
Lambda AWS
Please help me.
Hi,
Sorry for the late reply.
Your code and Gemfile are ok.
It looks like you're running it on Ruby 2.7 in lambda and it's not compatible with this chromedriver version.
Unfortunately, chromedriver must be compatible with your serverless chrome and ruby version, it's not easy to find a match.
The easiest solution, for now, would be to downgrade to ruby 2.5 in lambda - just create a new lambda function with this version.
Hello. from now on, aws plan to deprecate ruby 2.5.
So we have to migrate version of ruby 2.5 to 2.7.
How can i find compatible chromedriver version with ruby 2.7? Can you send me an reference? Thank you.
Hi Marcin,
AWS will stop supporting Ruby 2.5 in a few weeks. Do you have any update on chromedriver compatible with Ruby 2.7?
Your article was the most helpful source for creating a scraper with selenium and ruby for AWS lambda (great work btw!).
So I was hoping you have some news about how to build the scraper with Ruby 2.7
Thanks
I am working on that as well, if you find a way to do that send me a message, I'll share the info I gather with you as well.
Hello, Kronos, Did you find the solution? I am working on that, but I don't have any solutions so far. If you find the solution? Could you tell me about that? Thank you.
As a matter of fact I did I uploaded a short answer to a question in Stack Overflow
I provided some guidance you can check my solution here:
stackoverflow.com/questions/678419...
Now that ruby 2.5 is being deprecated by the end of July it'd be useful to update this tutorial to include a compatible chromedriver binary.
Otherwise this tutorial, and all projects inspired by it would be rendered useless.
When I run this command,
docker run --rm -v "$PWD":/var/task --mount type=tmpfs,target=/dev/shm,readonly=true lambci/lambda:ruby2.5 lambda_function.lambda_handler
Init error when loading handler lambda_function.lambda_handler
"errorMessage": "Could not find childprocess-3.0.0 in any of the sources",
"errorType": "InitBundler::GemNotFound",
Used the same code and gem versions as yours
I had to create ruby layers
stackoverflow.com/questions/536342...
Thanks for this post
Hi Marcin, I have a question
In the step "Install chromedriver and serverless chrome" where should I run the commands?
In your bash console, I assume this was developed using linux, so to open your linux console type ctrl+alt+t. there you chould use the cd command to change the directory you're working on and download the drivers directly there.