Closed avikha closed 3 years ago
Not sure how we can help, this clearly looks as an environment setup issue related to Chrome and ChromeDriver. Selenium WebDriver only starts ChromeDriver and sends requests to it.
Aside the suggestions you got from the Chrome/ChromeDriver folks, I do not know what else you could do. I know that AWS Lambda added support to run containers inside lambda, maybe try that path? We do not have experience with Lambda at the project, we cannot really provide good advice here.
I will close this because this is not a Selenium issue.
🐛 Bug Report
We are seeing
chrome not reachable
exception while running selenium ui tests on aws lambda.I also published a similar bug on chromium bug list. Unfortunately, there is still no happy news there.
To Reproduce
Step 1: Create AWS account, and then create the AWS lambda running selenium. Similar to what you can find here
Step 2: Then you can run the following test
Or
The Apple sites were chosen because they are rich, beautiful, interactive, and contain a lot of animations and modern techniques. However, this problem happens in our internal platform, not related to Apple at all. And, not related to scroll. It happens in all different test cases.
Expected behavior
We expected the tests to finish the run, the driver to be terminated, the logs to be printed (published), and everyone to be happy ever since. However, the reality is slightly different - it occurs that the test "fails" right after 60-90 seconds into the run.
We get the following message
Sometimes, the chrome also outputs the following message
More info
Not consistent problem
It is an interesting fact that the problem is not a consistent one, but rather statistical. For instance, running the tests above 30 times may result in 12
chrome not reachable
failures and 18 successes. There are tests where some of them will fail due to crashes for 5/30 and some 20/30.The memory issue
We struggle to understand what memory runs out? At first, we thought that it might be the RAM that is used by Lambda. So, what we did is to increase the lambda to MAX of 3Gb RAM - no help, still same problems.
We also noticed that the max memory usage of the lambda is approx 1.1Gb - chrome, chromedriver, java (general), and java tests/infra. Everything that runs on lambda. So we concluded that it is probably not the lambda memory issues.
Local/BrowserStack Runs
We could not recreate the problem running chrome heedlessly/full on "regular" local computer. We tried on Linux, Windows, and Macs. No success there. The same goes for BrowserStack - we can run the same test on the browser stack 30 times and it will pass. No crashes there.
Chrome versions tested and test relations
We also thought that there might be some relevance to some of our tests. However, we saw that on each browser version and each run there are different type of tests that fail. So no consistency there.
Environment
Operating System
Name: Linux Architecture: amd64 OS Version: 4.14.214-164.339.amzn2.x86_64
Browser
Vendor: Chromium Version: >= 79
Selenium/Language
Java: 1.8.0_201 Binding version: 3.141.0
Chrome flags