Skip to content
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

Suddenly got "Chrome is not reachable" in Selenium - Lambda JAVA17 Integration #145

Open
ZehavitSaban opened this issue May 27, 2024 · 3 comments
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. maintainer/need-followup stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Comments

@ZehavitSaban
Copy link

ZehavitSaban commented May 27, 2024

Description:

It looks like Amazon released a new java17 image after March 19th that caused this issue:
"Chrome is not reachable"

How to reproduce:

SE VERSION - 4.21.0
CHROME VERSION - 103.0.5058.0 (LAYER)
First, we build and deploy lambda with the following dependencies. So, when we invoke the Lambda, it already comes with these dependencies pre-installed on the Lambda.

dependencies {
    implementation (
            'com.amazonaws:aws-java-sdk-s3:1.12.730',
            'com.amazonaws:aws-lambda-java-core:1.2.3',
            'org.apache.commons:commons-lang3:3.14.0',
            'commons-io:commons-io:2.15.1',
            'org.apache.logging.log4j:log4j-api:2.22.0',
            'org.apache.logging.log4j:log4j-core:2.22.0'
    )
}

Inside the lambda, we use S3 to get the company's internal automation framework and the test code we want to run:

echo "running java (time left: $timeLeft)"
timeout ${timeLeft}s java -Dwebdriver.chrome.driver=$dir/drivers/chromedriver -Dchrome.binary=$dir/headless-chromium 
 -cp $jar com.duda.webdriver.elduderino.core.Main $test $url $retry $params 2>&1

Basically, before 19.3 it worked fine. We could run tests inside AWS Lambda and then integrate it with our CI/CD.
But, after your changes we can't.

Workaround:
I changed from the latest version to a previous released version (which was before 19.3) and it seems to solve the problem.
I would like to know what change caused this problem and how I should fix my code to support this change.

@ZehavitSaban ZehavitSaban added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label May 27, 2024
@jysheng123
Copy link

Hi, thanks for bringing up the issue. Would you be able to provide a sample lambda function that has this error occurring? It would help the debugging process a lot in assisting us to create steps to reproduce the issue

@jysheng123 jysheng123 added the blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. label May 30, 2024
@ZehavitSaban
Copy link
Author

Hi @jysheng123 , thanks for the support!
I created a sample lambda function. In our native lambda we use chromeLayer with chrome version 103. Our runtime is Java 17.

SeleniumLambda.zip

@ZehavitSaban
Copy link
Author

Hi @jysheng123 , can you please assist? We still have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. maintainer/need-followup stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

No branches or pull requests

3 participants