appium-docker-android
appium-docker-android copied to clipboard
Unable to run tests through remote ADB
Hello!
I was able to successfully set up Appium-Docker as a node for my Selenium Grid. And I'm also using a remote ADB Server for the devices. Running "ADB devices" inside the container I'm able to check that the container can communicate with the devices.

However, when running the tests, appium keeps restarting the ADB server and its not able to list the devices.

Does anyone have any idea why this is happening?
My Environment:
- Windows x64 Machine Hyper-V Enabled
- Docker Version 2.1.0.5
- Both Container and ADB Server is in the same machine
My yaml file
version: "3"
services:
selenium-hub:
image: selenium/hub:3.141.59-xenon
container_name: selenium-hub
ports:
- "4444:4444"
chrome:
image: selenium/node-chrome:3.141.59-xenon
volumes:
- /dev/shm:/dev/shm
depends_on:
- selenium-hub
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
firefox:
image: selenium/node-firefox:3.141.59-xenon
volumes:
- /dev/shm:/dev/shm
depends_on:
- selenium-hub
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
appium_android_device:
image: appium/appium
depends_on:
- selenium-hub
privileged: true
volumes:
- /dev/bus/usb:/dev/bus/usb
- ~/.android:/root/.android
environment:
- ADB_SERVER_SOCKET=tcp:host.docker.internal:5037
- APPIUM_HOST=appium_android_device
- CONNECT_TO_GRID=true
- SELENIUM_HOST=selenium-hub
#- CUSTOM_NODE_CONFIG=true
- BROWSER_NAME=chrome
If any info is missing, let me know.
+1
any update on this please? Experiencing the same issue
docker run --privileged -it -p 4723:4723 -v /Users/xxxxxx/Shared/nodeconfig_emulator-5554.json:/root/nodeconfig.json -e "CONNECT_TO_GRID=true" -e "CUSTOM_NODE_CONFIG=true" -e "ADB_SERVER_SOCKET=tcp:IP:5555" --name "appium" appium/appium:latest
docker exec -it appium adb devices List of devices attached emulator-5554 device
any update on this please?
having the same issue
after digging around at cs.android.com I came up with the following workaround:
replace ADB_SERVER_SOCKET=tcp:host.docker.internal:5037 with ANDROID_ADB_SERVER_ADDRESS=host.docker.internal and if using a non default port also set ANDROID_ADB_SERVER_PORT
https://cs.android.com/android/platform/superproject/+/master:system/core/adb/client/commandline.cpp;l=1616?q=ADB_SERVER_SOCKET
Hi, I’m facing the same issue with docker container
Did anybody was able to fix that ?
start-server'[ADB] Error killing ADB server, going to see if it's online anyway [debug] [ADB] Getting connected devices [debug] [ADB] Could not find online devices [debug] [ADB] Reconnecting adb (target offline) [debug] [ADB] Running '/usr/local/android-sdk/platform-tools/adb -P 5037 reconnect offline' [debug] [ADB] Restarting adb [debug] [ADB] Killing adb server on port '5037' [debug] [ADB] Running '/usr/local/android-sdk/platform-tools/adb -P 5037 kill-server' [debug] [ADB] Running '/usr/local/android-sdk/platform-tools/adb -P 5037 start-server'`
Hey,
does someone know how to fix the adb.cpp:112 {device}" offlone issue?
close the issue as it might be fixed on the newest release. feel free to reopen the issue if the error still there