Setting up multi device testing from one box failing inconsistently

So I’m trying to setup two Jenkins job that kick off on the same box and spin up two instances for appium to run the same testsuite against two devices but it keeps throwing excepting and hanging up. Could someone please take a look?

Here’s the log seen from the test:

Setup failed:
WebDriverException: Message: ‘{“sessionId”:null,“status”:6,“value”:""}’

Also teardown failed:
WebDriverException: Message: ‘{“sessionId”:null,“status”:6,“value”:""}’

Here’s appium log from 1st instance:

2014-12-05T21:33:40.514Z - info: Welcome to Appium v1.2.0 (REV e53f49c)
2014-12-05T21:33:40.515Z - info: Appium REST http interface listener started on 0.0.0.0:5723
2014-12-05T21:33:40.518Z - debug: Non-default server args: {“udid”:“99000051504507”,“port”:5723,“bootstrapPort”:2723,“sessionOverride”:true,“log”:"/home/appium.log"}
2014-12-05T21:33:40.518Z - info: LogLevel: debug


14-12-05T21:35:28.081Z - info: Found device 99000051504507
2014-12-05T21:35:28.081Z - debug: Setting device id to 99000051504507
2014-12-05T21:35:28.082Z - debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
2014-12-05T21:35:28.082Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 wait-for-device
2014-12-05T21:35:28.092Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “echo ‘ready’”
2014-12-05T21:35:28.154Z - debug: Starting logcat capture
2014-12-05T21:35:28.243Z - warn: No app capability, can’t parse package/activity
2014-12-05T21:35:28.244Z - debug: Getting device API level
2014-12-05T21:35:28.244Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “getprop ro.build.version.sdk”
2014-12-05T21:35:28.322Z - debug: Device is at API Level 19
2014-12-05T21:35:28.323Z - info: Device API level is: 19
2014-12-05T21:35:28.323Z - debug: Apk doesn’t exist locally
2014-12-05T21:35:28.323Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “rm -rf /data/local/tmp/strings.json”
2014-12-05T21:35:28.392Z - debug: Not uninstalling app since server not started with --full-reset
2014-12-05T21:35:28.392Z - debug: Skipping install since we launched with a package instead of an app path
2014-12-05T21:35:28.392Z - debug: Forwarding system:2723 to device:4724
2014-12-05T21:35:28.393Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 forward tcp:2723 tcp:4724
2014-12-05T21:35:28.415Z - debug: Pushing appium bootstrap to device…
2014-12-05T21:35:28.415Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 push “/home/itson/local/lib/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar” /data/local/tmp/
2014-12-05T21:35:28.516Z - debug: Pushing settings apk to device…
2014-12-05T21:35:28.517Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 install “/home/itson/local/lib/node_modules/appium/build/settings_apk/settings_apk-debug.apk”
2014-12-05T21:35:30.079Z - debug: Pushing unlock helper app to device…
2014-12-05T21:35:30.079Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 install “/home/itson/local/lib/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk”
2014-12-05T21:35:31.642Z - info: Starting App
2014-12-05T21:35:31.642Z - debug: Attempting to kill all ‘uiautomator’ processes
2014-12-05T21:35:31.642Z - debug: Getting all processes with ‘uiautomator’
2014-12-05T21:35:31.642Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “ps ‘uiautomator’”
2014-12-05T21:35:31.808Z - debug: Attempting to kill process 8546
2014-12-05T21:35:31.809Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “kill 8546”
2014-12-05T21:35:31.877Z - debug: Running bootstrap
2014-12-05T21:35:31.877Z - debug: spawning: /home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb -s 99000051504507 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
2014-12-05T21:35:31.885Z - debug: UiAutomator exited
2014-12-05T21:35:31.885Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “echo ‘ping’”
2014-12-05T21:35:31.998Z - debug: Attempting to uninstall app
2014-12-05T21:35:31.999Z - debug: Not uninstalling app since server not started with --full-reset
2014-12-05T21:35:31.999Z - debug: Cleaning up android objects
2014-12-05T21:35:31.999Z - debug: Cleaning up appium session
2014-12-05T21:35:32.679Z - debug: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
2014-12-05T21:35:32.679Z - debug: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
2014-12-05T21:35:32.680Z - debug: [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
2014-12-05T21:35:32.680Z - debug: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
2014-12-05T21:35:32.680Z - debug: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
2014-12-05T21:35:32.681Z - debug: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
2014-12-05T21:35:32.682Z - debug: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
2014-12-05T21:35:32.682Z - debug: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
2014-12-05T21:35:32.722Z - debug: [BOOTSTRAP] [debug] Socket opened on port 4724
2014-12-05T21:35:32.723Z - debug: [BOOTSTRAP] [debug] Appium Socket Server Ready
2014-12-05T21:35:32.724Z - debug: [BOOTSTRAP] [debug] Loading json…
2014-12-05T21:35:32.724Z - debug: Waking up device if it’s not alive
2014-12-05T21:35:32.724Z - debug: Pushing command to appium work queue: [“wake”,{}]
2014-12-05T21:35:32.728Z - debug: [BOOTSTRAP] [debug] Registered crash watchers.
2014-12-05T21:35:32.730Z - debug: [BOOTSTRAP] [debug] Client connected
2014-12-05T21:35:32.732Z - debug: [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“wake”,“params”:{}}
2014-12-05T21:35:32.736Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-12-05T21:35:32.736Z - debug: [BOOTSTRAP] [debug] Got command action: wake
2014-12-05T21:35:32.738Z - debug: [BOOTSTRAP] [debug] Returning result: {“value”:true,“status”:0}
2014-12-05T21:35:32.739Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “dumpsys window”
2014-12-05T21:35:32.837Z - debug: Writing dumpsys output to /home/itson/local/lib/node_modules/appium/.dumpsys.log
2014-12-05T21:35:32.837Z - debug: Screen already unlocked, continuing.
2014-12-05T21:35:32.838Z - debug: Pushing command to appium work queue: [“getDataDir”,{}]
2014-12-05T21:35:32.841Z - debug: [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
2014-12-05T21:35:32.842Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-12-05T21:35:32.842Z - debug: [BOOTSTRAP] [debug] Got command action: getDataDir
2014-12-05T21:35:32.842Z - debug: [BOOTSTRAP] [debug] Returning result: {“value”:"/data/local/tmp",“status”:0}
2014-12-05T21:35:32.842Z - debug: dataDir set to: /data/local/tmp
2014-12-05T21:35:32.843Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.itsoninc.android.itsonclient/com.itsoninc.android.core.ui.MainDashboardActivity”
2014-12-05T21:35:34.190Z - debug: Waiting for pkg “com.itsoninc.android.itsonclient” and activity “com.itsoninc.android.core.ui.MainDashboardActivity” to be focused
2014-12-05T21:35:34.190Z - debug: Getting focused package and activity
2014-12-05T21:35:34.191Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 99000051504507 shell “dumpsys window windows”
2014-12-05T21:35:34.280Z - debug: Device launched! Ready for commands
2014-12-05T21:35:34.280Z - debug: Setting command timeout to the default of 60 secs
2014-12-05T21:35:34.281Z - debug: Appium session started with sessionId null
2014-12-05T21:35:34.282Z - info: <-- POST /wd/hub/session 303 6212.670 ms - 9
2014-12-05T21:35:34.283Z - info: --> GET /wd/hub/session/null {}
2014-12-05T21:35:34.283Z - debug: Appium request initiated at /wd/hub/session/null
2014-12-05T21:35:34.283Z - debug: Request received with params: {}
2014-12-05T21:35:34.284Z - info: <-- GET /wd/hub/session/null 404 0.804 ms - 40
2014-12-05T21:35:34.287Z - info: --> GET /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69/screenshot {}
2014-12-05T21:35:34.287Z - debug: Appium request initiated at /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69/screenshot
2014-12-05T21:35:34.287Z - debug: Request received with params: {}
2014-12-05T21:35:34.287Z - info: <-- GET /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69/screenshot 404 0.717 ms - 40
2014-12-05T21:35:34.309Z - info: --> DELETE /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69 {}
2014-12-05T21:35:34.310Z - debug: Appium request initiated at /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69
2014-12-05T21:35:34.310Z - debug: Request received with params: {}
2014-12-05T21:35:34.311Z - info: <-- DELETE /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69 404 1.675 ms - 40
2014-12-05T21:35:34.314Z - info: --> GET /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69/screenshot {}
2014-12-05T21:35:34.314Z - debug: Appium request initiated at /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69/screenshot
2014-12-05T21:35:34.314Z - debug: Request received with params: {}
2014-12-05T21:35:34.315Z - info: <-- GET /wd/hub/session/c0798b92-8462-4457-882a-94ff3e6d0c69/screenshot 404 0.764 ms - 40
2014-12-05T21:36:32.323Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.324Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.324Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.324Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.324Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.325Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.325Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.325Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.326Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.326Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.326Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.327Z - debug: Logcat terminated with code 0, signal null

Here’s appium log from 2nd instance:

2014-12-05T21:35:06.669Z - info: Welcome to Appium v1.2.0 (REV e53f49c)
2014-12-05T21:35:06.670Z - info: Appium REST http interface listener started on 0.0.0.0:6723
2014-12-05T21:35:06.672Z - debug: Non-default server args: {“udid”:“0736bf500063bae9”,“port”:6723,“bootstrapPort”:6725,“sessionOverride”:true,“log”:"/home/appium2.log"}
2014-12-05T21:35:06.672Z - info: LogLevel: debug


2014-12-05T21:36:32.109Z - info: Starting android appium
2014-12-05T21:36:32.109Z - debug: Using fast reset? true
2014-12-05T21:36:32.109Z - debug: Preparing device for session
2014-12-05T21:36:32.110Z - debug: Not checking whether app is present since we are assuming it’s already on the device
2014-12-05T21:36:32.110Z - debug: Checking whether adb is present
2014-12-05T21:36:32.111Z - debug: Using adb from /home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb
2014-12-05T21:36:32.111Z - info: Retrieving device
2014-12-05T21:36:32.111Z - debug: Trying to find a connected android device
2014-12-05T21:36:32.111Z - debug: Getting connected devices…
2014-12-05T21:36:32.112Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” devices
2014-12-05T21:36:32.118Z - debug: 3 device(s) connected
2014-12-05T21:36:32.119Z - info: Found device 0736bf500063bae9
2014-12-05T21:36:32.119Z - debug: Setting device id to 0736bf500063bae9
2014-12-05T21:36:32.119Z - debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
2014-12-05T21:36:32.119Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 wait-for-device
2014-12-05T21:36:32.129Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “echo ‘ready’”
2014-12-05T21:36:32.181Z - debug: Starting logcat capture
2014-12-05T21:36:32.268Z - warn: No app capability, can’t parse package/activity
2014-12-05T21:36:32.269Z - debug: Getting device API level
2014-12-05T21:36:32.269Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”
2014-12-05T21:36:32.301Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.301Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.301Z - debug: UiAutomator exited
2014-12-05T21:36:32.302Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “echo ‘ping’”
2014-12-05T21:36:32.305Z - debug: Logcat terminated with code 0, signal null
2014-12-05T21:36:32.308Z - warn: killed=false, code=255, signal=null, cmd=/bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”
2014-12-05T21:36:32.308Z - warn: killed=false, code=255, signal=null, cmd=/bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”
2014-12-05T21:36:32.309Z - debug: Stopping logcat capture
2014-12-05T21:36:32.309Z - debug: Logcat already stopped
2014-12-05T21:36:32.310Z - debug: Sent shutdown command, waiting for UiAutomator to stop…
2014-12-05T21:36:32.311Z - warn: killed=false, code=255, signal=null, cmd=/bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “echo ‘ping’”
2014-12-05T21:36:32.311Z - debug: killed=false, code=255, signal=null, cmd=/bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “echo ‘ping’”
2014-12-05T21:36:32.312Z - debug: Stopping logcat capture
2014-12-05T21:36:32.312Z - debug: Logcat already stopped
2014-12-05T21:36:32.312Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 kill-server
2014-12-05T21:36:32.324Z - debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
2014-12-05T21:36:32.325Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 wait-for-device
2014-12-05T21:36:37.325Z - debug: Retrying restartAdb
2014-12-05T21:36:37.326Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 kill-server
2014-12-05T21:36:37.336Z - warn: killed=false, code=1, signal=null, cmd=/bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 wait-for-device
2014-12-05T21:36:37.336Z - debug: Getting connected devices…
2014-12-05T21:36:37.336Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 devices
2014-12-05T21:36:39.313Z - warn: UiAutomator did not shut down fast enough, calling it gone
2014-12-05T21:36:39.314Z - debug: Cleaning up android objects
2014-12-05T21:36:39.314Z - debug: Cleaning up appium session
2014-12-05T21:36:39.315Z - error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”
error: protocol fault (no status)
error: protocol fault (no status)

2014-12-05T21:36:39.316Z - debug: Error: Command failed: /bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”
error: protocol fault (no status)
error: protocol fault (no status)

at ChildProcess.exithandler (child_process.js:729:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:994:16)
at Socket. (child_process.js:1162:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:461:12)
2014-12-05T21:36:39.317Z - debug: Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: /bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”\nerror: protocol fault (no status)\nerror: protocol fault (no status)\n)”,“killed”:false,“code”:255,“signal”:null,“cmd”:"/bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”",“origValue”:“Command failed: /bin/sh -c “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “getprop ro.build.version.sdk”\nerror: protocol fault (no status)\nerror: protocol fault (no status)\n”},“sessionId”:null}
2014-12-05T21:36:39.318Z - info: <-- POST /wd/hub/session 500 7211.358 ms - 791
2014-12-05T21:36:39.322Z - info: --> GET /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705/screenshot {}
2014-12-05T21:36:39.322Z - debug: Appium request initiated at /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705/screenshot
2014-12-05T21:36:39.323Z - debug: Request received with params: {}
2014-12-05T21:36:39.323Z - info: <-- GET /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705/screenshot 404 1.114 ms - 40
2014-12-05T21:36:39.330Z - info: --> DELETE /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705 {}
2014-12-05T21:36:39.330Z - debug: Appium request initiated at /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705
2014-12-05T21:36:39.330Z - debug: Request received with params: {}
2014-12-05T21:36:39.331Z - info: <-- DELETE /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705 404 0.769 ms - 40
2014-12-05T21:36:39.333Z - info: --> GET /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705/screenshot {}
2014-12-05T21:36:39.333Z - debug: Appium request initiated at /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705/screenshot
2014-12-05T21:36:39.333Z - debug: Request received with params: {}
2014-12-05T21:36:39.334Z - info: <-- GET /wd/hub/session/92c95713-980a-48ab-9f85-1eb4c4703705/screenshot 404 0.769 ms - 40
2014-12-05T21:36:39.355Z - info: --> POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“Nexus-5-Auto1”,“takesScreenshot”:“true”,“app”:"",“androidActivity”:“com.itsoninc.android.core.ui.MainDashboardActivity”,“platformVersion”:“4.4”,“appPackage”:“com.itsoninc.android.itsonclient”,“platformName”:“Android”,“automationName”:""}}
2014-12-05T21:36:39.356Z - debug: Appium request initiated at /wd/hub/session
2014-12-05T21:36:39.356Z - debug: Request received with params: {“desiredCapabilities”:{“deviceName”:“Nexus-5-Auto1”,“takesScreenshot”:“true”,“app”:"",“androidActivity”:“com.itsoninc.android.core.ui.MainDashboardActivity”,“platformVersion”:“4.4”,“appPackage”:“com.itsoninc.android.itsonclient”,“platformName”:“Android”,“automationName”:""}}
2014-12-05T21:36:39.356Z - debug: The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : takesScreenshot, androidActivity
2014-12-05T21:36:39.357Z - debug: Didn’t get app but did get Android package, will attempt to launch it on the device
2014-12-05T21:36:39.357Z - debug: Creating new appium session 008bb29d-f30c-4245-9f06-581dc2140768
2014-12-05T21:36:39.358Z - info: Starting android appium
2014-12-05T21:36:39.358Z - debug: Using fast reset? true
2014-12-05T21:36:39.358Z - debug: Preparing device for session
2014-12-05T21:36:39.358Z - debug: Not checking whether app is present since we are assuming it’s already on the device
2014-12-05T21:36:39.359Z - debug: Checking whether adb is present
2014-12-05T21:36:39.360Z - debug: Using adb from /home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb
2014-12-05T21:36:39.360Z - info: Retrieving device
2014-12-05T21:36:39.360Z - debug: Trying to find a connected android device
2014-12-05T21:36:39.360Z - debug: Getting connected devices…
2014-12-05T21:36:39.361Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” devices
2014-12-05T21:36:39.369Z - debug: 2 device(s) connected
2014-12-05T21:36:39.370Z - debug: Sent shutdown command, waiting for UiAutomator to stop…
2014-12-05T21:36:40.348Z - debug: 2 device(s) connected
2014-12-05T21:36:40.348Z - debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
2014-12-05T21:36:40.348Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 wait-for-device
2014-12-05T21:36:41.358Z - debug: executing: “/home/itson/Documents/adt-bundle-linux-x86-20140624/sdk/platform-tools/adb” -s 0736bf500063bae9 shell “echo ‘ready’”
2014-12-05T21:36:41.409Z - debug: Starting logcat capture
2014-12-05T21:36:41.497Z - debug: Attempting to uninstall app
2014-12-05T21:36:41.497Z - debug: Not uninstalling app since server not started with --full-reset
2014-12-05T21:36:41.497Z - debug: Cleaning up android objects
2014-12-05T21:36:41.499Z - debug: Cleaning up appium session
2014-12-05T21:36:46.370Z - warn: UiAutomator did not shut down fast enough, calling it gone
2014-12-05T21:36:46.370Z - debug: Cleaning up android objects
2014-12-05T21:36:46.371Z - debug: Cleaning up appium session
2014-12-05T21:36:46.371Z - error: Failed to start an Appium session, err was: Error: Device 0736bf500063bae9 was not in the list of connected devices
2014-12-05T21:36:46.372Z - debug: Error: Device 0736bf500063bae9 was not in the list of connected devices
at null. (/home/itson/local/lib/node_modules/appium/lib/devices/android/android-common.js:354:19)
at null. (/home/itson/local/lib/node_modules/appium/node_modules/appium-adb/lib/adb.js:615:9)
at null. (/home/itson/local/lib/node_modules/appium/node_modules/appium-adb/lib/adb.js:842:7)
at /home/itson/local/lib/node_modules/appium/node_modules/appium-adb/lib/adb.js:162:5
at ChildProcess.exithandler (child_process.js:720:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:994:16)
at Socket. (child_process.js:1162:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:461:12)

Is there something I’m missing? Both are android devices and they work to a certain extent before failing out, has anyone encountered this issue?

I’m running appium version: 1.2.0 (which I believe have all the multi device support capabilities)

Note: I’ve read other threads on setting up multiple devices and you can probably see that I’m able to launch and run but one of the devices just hangs or errors out.

Could someone please suggest any fix?