Appium server insite a selenium grid network

Hello Appium,

I have a Selenium grid setup (machine A) with multiple desktop nodes (Windows, Linux, Mac,…) (machines B, C & D). From a heavily firewalled machine in the development/testing network, I fire up Behat tests to the grid and nodes through a ssh tunnel.
In this setup all runs ok: I fire up the Behat tests, the grid distributes them to the nodes and they show their browsers running the tests.

Now I also want to add an appium server. The appium node registers perfectly to the Selenium grid, it shows up on the grid console. When I start the Behat tests with the android profile, I can see the android device being unlocked, starting up the browser but then nothing happens anymore…

Looking at the logs, I can see that the devices gets unlocked, it starts to bootstrap, it starts up a chrome driver on port 9515 but then I see debug logs ‘Proxying command to’ a couple of times until everything times out…

Is it possible the chromedriver does not connect correctly to the selenium grid on the other server?

BTW, I was trying this with the appium on the same machine as where the selenium grid was running and then it does work correctly. Only when the appium and grid are on different machines it fails…

Anybody any idea how to solve?

Adding the appium logs:

info: Unlocking screen
info: [debug] Screen is locked, trying to unlock
info: [debug] Getting device API level
info: [debug] executing cmd: /home/trogie/Work/android/android-sdk-linux/platform-tools/adb -s R32D302294N shell “getprop”
info: [debug] Device is at API Level 21
info: [debug] executing cmd: /home/trogie/Work/android/android-sdk-linux/platform-tools/adb -s R32D302294N shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.appium.unlock/.Unlock”
info: [debug] executing cmd: /home/trogie/Work/android/android-sdk-linux/platform-tools/adb -s R32D302294N shell “dumpsys window”
info: [debug] Screen is unlocked, continuing
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: /home/trogie/Work/android/android-sdk-linux/platform-tools/adb -s R32D302294N forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: /home/trogie/Work/android/android-sdk-linux/platform-tools/adb -s R32D302294N push “/home/trogie/Work/appium/node-v0.10.35-linux-x64/lib/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar” /data/local/tmp/
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing cmd: /home/trogie/Work/android/android-sdk-linux/platform-tools/adb -s R32D302294N shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: /home/trogie/Work/android/android-sdk-linux/platform-tools/adb -s R32D302294N shell uiautomator runtest AppiumBootstrap.jar -c
info: [debug] [UIAUTOMATOR STDOUT]
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:"/data/local/tmp"}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Creating Chrome session
info: [debug] Determining linux architecture
info: [debug] Set chromedriver binary as: /home/trogie/Work/appium/node-v0.10.35-linux-x64/lib/node_modules/appium/build/chromedriver/linux/chromedriver64
info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: ps -ef | grep /home/trogie/Work/appium/node-v0.10.35-linux-x64/lib/node_modules/appium/build/chromedriver/linux/chromedriver64 | grep -v grep |grep -e ‘–port=9515(\s.*)?$’ | awk ‘{ print $2 }’ | xargs kill -15
info: [debug] Successfully cleaned up old chromedrivers
info: [debug] Spawning chromedriver with: /home/trogie/Work/appium/node-v0.10.35-linux-x64/lib/node_modules/appium/build/chromedriver/linux/chromedriver64
info: [debug] [CHROMEDRIVER] Starting ChromeDriver 2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf) on port 9515
Only local connections are allowed.
info: [debug] Making http request with opts: {“url”:“",“method”:“POST”,“json”:{“sessionId”:null,“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“”,“androidDeviceSerial”:"R32D302294N”}}}}
info: [debug] [BOOTSTRAP] [debug] Emitting system alert message
info: [debug] Emitting alert message…
info: --> GET /wd/hub/status {}
info: [debug] Proxying command to
info: [debug] Making http request with opts: {“url”:“",“method”:"GET”}
info: [debug] Proxied response received with status 200: “{“sessionId”:”",“status”:0,“value”:{“build”:{“version”:“alpha”},“os”:{“arch”:“x86_64”,“name”:“Linux”,“version”:“3.13.0-45-generic”}}}"
info: <-- GET /wd/hub/status 200 11.759 ms - 133
info: [debug] [CHROMEDRIVER STDERR] [3,374][WARNING]: PAC support disabled because there is no system implementation
info: [debug] Successfully started chrome session 0d22258b12da6af2a22c77a8cb6c161e
info: [debug] Overriding session id with “0d22258b12da6af2a22c77a8cb6c161e”
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId 0d22258b12da6af2a22c77a8cb6c161e
info: <-- POST /wd/hub/session 303 8893.586 ms - 9
info: --> GET /wd/hub/status {}
info: [debug] Proxying command to
info: [debug] Making http request with opts: {“url”:“",“method”:"GET”}
info: [debug] Proxied response received with status 200: “{“sessionId”:”",“status”:0,“value”:{“build”:{“version”:“alpha”},“os”:{“arch”:“x86_64”,“name”:“Linux”,“version”:“3.13.0-45-generic”}}}"
info: <-- GET /wd/hub/status 200 2.945 ms - 133
info: --> GET /wd/hub/status {}
info: [debug] Proxying command to
info: [debug] Making http request with opts: {“url”:“",“method”:"GET”}
info: [debug] Proxied response received with status 200: “{“sessionId”:”",“status”:0,“value”:{“build”:{“version”:“alpha”},“os”:{“arch”:“x86_64”,“name”:“Linux”,“version”:“3.13.0-45-generic”}}}"
info: <-- GET /wd/hub/status 200 6.423 ms - 133

Hi all,

I’m getting below error while connecting to Grid using Appium , the second device getting error and one device is executing fine.

error: Unhandled error: Error: read ECONNRESET
at errnoException (net.js:905:11)
at TCP.onread (net.js:559:19) context: [POST /wd/hub/session {"desiredCapabilities…

Error Coming while running multiple sessions using appium.

I’m using different ports 4723, 4724 for two devices.