docker-android icon indicating copy to clipboard operation
docker-android copied to clipboard

Wrong Chrome version in image budtmo/docker-android-x86-12.0

Open pabloFuente opened this issue 3 years ago • 5 comments

🐛 Bug Report

Operating System: Does not matter

Docker Image: budtmo/docker-android-x86-12.0

Docker Version:
Does not matter

Docker-compose version (Only if you use it):
Does not matter

Docker Command to start docker-android:

docker run --privileged --rm --name android-chrome -p 6080:6080 -p 5554:5554 -p 5555:5555 -p 4723:4723 -e DEVICE="Samsung Galaxy S10" -e APPIUM=true -e APPIUM_HOST=172.17.0.1 -e APPIUM_PORT=4723 -e MOBILE_WEB_TEST=true -e RELAXED_SECURITY=true budtmo/docker-android-x86-12.0

Expected Behavior

The table information at https://github.com/budtmo/docker-android#list-of-docker-images states the following versions:

Android 12.0 Browser version 93.0 Chromedriver: 93.0.4577.15


Actual Behavior

The Chrome Driver version is indeed 93.0.4577.15, as confirmed from the /root/chromedriver file inside the container:

image

But the Chrome version inside the container is the following one:

image

And this causes the following error when trying to initialize a RemoteWebDriver through selenium hub:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: A new session could not be created. Details: session not created: This version of ChromeDriver only supports Chrome version 93 Current browser version is 91.0.4472.114 with package name com.android.chrome

pabloFuente avatar Nov 04 '21 19:11 pabloFuente

In the meantime I have a simple docker exec command to overcome this version incompatibility:

First run the container: docker run --privileged --rm --name android-chrome -p 6080:6080 -p 5554:5554 -p 5555:5555 -p 4723:4723 -e DEVICE="Samsung Galaxy S10" -e APPIUM=true -e APPIUM_HOST=172.17.0.1 -e APPIUM_PORT=4723 -e MOBILE_WEB_TEST=true -e RELAXED_SECURITY=true budtmo/docker-android-x86-12.0

Then overwrite the chromedriver version: docker exec android-chrome bash -c "rm chromedriver && wget https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_linux64.zip && unzip chromedriver_linux64.zip && rm chromedriver_linux64.zip"

With this command Selenium no longer returns the error and the test runs successfully.

pabloFuente avatar Nov 04 '21 21:11 pabloFuente

Hi @pabloFuente ,

could you send a PR to fix the issue?

budtmo avatar Nov 17 '21 13:11 budtmo

I am not sure the proper way to fix the issue is the hack I used. The solution should be to update both the version of Google Chrome and the version of the chromedriver inside the Android emulator image.

Besides, there is no place where to add my fix. The fix consists on running a command inside the container after starting it. So it really has no place in this repository.

Any thoughts?

pabloFuente avatar Nov 17 '21 13:11 pabloFuente

@budtmo why don't you use appium with key --allow-insecure chromedriver_autodownload? example: appium -p 4724 --allow-insecure chromedriver_autodownload Docs

rossanoua avatar Jan 25 '22 14:01 rossanoua

Hi @budtmo! I hope you are doing well.

I'm having the same issue. My Chrome version is 91 and my Chromedriver is 93. In hub.docker.com I found the image for budtmo/docker-android-x86-12.0:latest https://hub.docker.com/layers/budtmo/docker-android-x86-12.0/latest/images/sha256-007609f4c05f6184213a2f62d80f31d6d8a78381f056ebf568c35ea377948656?context=explore There I found on the line 36 "CHROME_DRIVER=93.0.4577.15". Accoarding to the PR above, I think it should be 91.0.4472.101 instead, right? For now, I'll use budtmo/docker-android-x86-11.0, but could you push an update with the change requested? I think I cannot do that.

Thank you :)

Ahernandez2904 avatar Jan 26 '23 23:01 Ahernandez2904