Closed yahman72 closed 2 years ago
Some additional info: I tried this with 3 different devices (Sony Xperia/Android4.3, Samsung Galaxy S4Android4.4, Huawei Y530/Android4.3) - same results = appium restarts ADB server after every adb shell
command...
it seems i met the same issue when i tried to perform testing on two different port appium server and android simulator..Check the log below,
36minfo[39m: [debug] executing: "/Users/tobytang/DevTools/android/sdk/platform-tools/adb" -s 192.168.56.101:5555 forward tcp:4724 tcp:4724 [36minfo[39m: [debug] Pushing appium bootstrap to device... [36minfo[39m: [debug] executing: "/Users/tobytang/DevTools/android/sdk/platform-tools/adb" -s 192.168.56.101:5555 push "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar" /data/local/tmp/ [36minfo[39m: [debug] Pushing settings apk to device... [36minfo[39m: [debug] executing: "/Users/tobytang/DevTools/android/sdk/platform-tools/adb" -s 192.168.56.101:5555 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/settings_apk/settings_apk-debug.apk" [36minfo[39m: [debug] Pushing unlock helper app to device... [36minfo[39m: [debug] executing: "/Users/tobytang/DevTools/android/sdk/platform-tools/adb" -s 192.168.56.101:5555 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk" [36minfo[39m: Starting App [36minfo[39m: [debug] Attempting to kill all 'uiautomator' processes [36minfo[39m: [debug] Getting all processes with 'uiautomator' [36minfo[39m: [debug] executing: "/Users/tobytang/DevTools/android/sdk/platform-tools/adb" -s 192.168.56.101:5555 shell "ps 'uiautomator'" [36minfo[39m: [debug] No matching processes found [36minfo[39m: [debug] Running bootstrap [36minfo[39m: [debug] spawning: /Users/tobytang/DevTools/android/sdk/platform-tools/adb -s 192.168.56.101:5555 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1[39m [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=[39m [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:[39m [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner[39m [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer[39m [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap[39m [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1[39m [36minfo[39m: [debug] [90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1[39m [36minfo[39m: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724 [36minfo[39m: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready [36minfo[39m: [debug] [BOOTSTRAP] [debug] Loading json... [36minfo[39m: [debug] [BOOTSTRAP] [debug] json loading complete. [36minfo[39m: [debug] [BOOTSTRAP] [debug] Registered crash watchers. [36minfo[39m: [debug] Waking up device if it's not alive [36minfo[39m: [debug] Pushing command to appium work queue: ["wake",{}] [31merror[39m: Unhandled error: Error: read ECONNRESET at errnoException (net.js:904:11) at TCP.onread (net.js:558:19) context: [POST /wd/hub/session {"desiredCapabilities":
Appium restarts abd
in this process because abd
generally stops working at this point. I will look into getting around the race condition.
Closed as obsolete
Using![image](https://cloud.githubusercontent.com/assets/8724383/5493113/0ea9fa98-86e8-11e4-887c-9eb97b861c01.png)
set network connection
(/wd/hub/session/.../network_connection
) with two devices (=two appiums listening on different ports, using single adb instance = one port, see figure below)This causes a race condition between the appium instances. --> One of the instances looses all session data and starts responding with
WebDriverException: Message: {"sessionId":null,"status":6,"value":""}
With a single device everything goes fine. Don't know how appium should behave but the following looks like a really weird in the logs: after every
adb shell
call the adb server is restarted withadb kill-server
, is that correct? This eventually also leads to the race condition, because both appium instances keep killing and restarting the adb server....Below are the logs from each appium instance.
Single Device Logs:
Two Devices Logs: