{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/5272","labels_url":"https://api.github.com/repos/appium/appium/issues/5272/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/5272/comments","events_url":"https://api.github.com/repos/appium/appium/issues/5272/events","html_url":"https://github.com/appium/appium/issues/5272","id":89351070,"number":5272,"title":"Appium crashes for Airplane mode parallel testing","user":{"login":"gauravgandhi15","id":4743766,"avatar_url":"https://avatars.githubusercontent.com/u/4743766?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravgandhi15","html_url":"https://github.com/gauravgandhi15","followers_url":"https://api.github.com/users/gauravgandhi15/followers","following_url":"https://api.github.com/users/gauravgandhi15/following{/other_user}","gists_url":"https://api.github.com/users/gauravgandhi15/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravgandhi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravgandhi15/subscriptions","organizations_url":"https://api.github.com/users/gauravgandhi15/orgs","repos_url":"https://api.github.com/users/gauravgandhi15/repos","events_url":"https://api.github.com/users/gauravgandhi15/events{/privacy}","received_events_url":"https://api.github.com/users/gauravgandhi15/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appium/appium/labels/Android","name":"Android","color":"ADFF2F"},{"url":"https://api.github.com/repos/appium/appium/labels/OnGoing","name":"OnGoing","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-18T17:33:27Z","updated_at":"2015-06-18T18:26:10Z","closed_at":null,"body":"I have been trying to run some airplane mode test cases which includes turing it ON/OFF. It works fine on one device, but when i try to run it on multiple device then Appium crashes for some reason and unable to find the second connected device. Also, i am using NetworkConnectionSetting class for this functionality. Look at the logs:\r\n\r\n{\"compressLayout\":false}]\r\ninfo: [debug] [BOOTSTRAP] [debug] Registered crash watchers.\r\ninfo: [debug] [BOOTSTRAP] [debug] Client connected\r\ninfo: [debug] [BOOTSTRAP] [debug] Got data from client: {\"cmd\":\"action\",\"action\":\"compressedLayoutHierarchy\",\"params\":{\"compressLayout\":false}}\r\ninfo: [debug] [BOOTSTRAP] [debug] Got command of type ACTION\r\ninfo: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy\r\ninfo: [debug] [BOOTSTRAP] [debug] Returning result: {\"value\":false,\"status\":0}\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 shell \"am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false\"\r\ninfo: [debug] Stopping logcat capture\r\ninfo: [debug] Logcat terminated with code null, signal SIGTERM\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 kill-server\r\ninfo: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 wait-for-device\r\ninfo: [debug] UiAutomator exited\r\ninfo: error sending command, reconnecting device and retrying: wait-for-device\r\ninfo: [debug] Trying to find a connected android device\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] 0 device(s) connected\r\ninfo: [debug] Could not find devices, restarting adb server...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 kill-server\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] Retrying restartAdb\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 kill-server\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: error sending command, reconnecting device and retrying: devices\r\ninfo: [debug] Could not find devices, restarting adb server...\r\ninfo: [debug] Trying to find a connected android device\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 kill-server\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: error sending command, reconnecting device and retrying: devices\r\ninfo: [debug] Trying to find a connected android device\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 wait-for-device\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 shell \"echo 'ready'\"\r\ninfo: [debug] Starting logcat capture\r\ninfo: [debug] Forwarding system:5422 to device:4724\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 forward tcp:5422 tcp:4724\r\ninfo: Starting App\r\ninfo: [debug] Attempting to kill all 'uiautomator' processes\r\ninfo: [debug] Getting all processes with 'uiautomator'\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 shell \"ps 'uiautomator'\"\r\ninfo: [debug] No matching processes found\r\ninfo: [debug] Running bootstrap\r\ninfo: [debug] spawning: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg packagename -e disableAndroidWatchers false\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=\r\ninfo: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1\r\ninfo: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724\r\ninfo: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready\r\ninfo: [debug] [BOOTSTRAP] [debug] Loading json...\r\ninfo: [debug] Pushing command to appium work queue: [\"compressedLayoutHierarchy\",{\"compressLayout\":false}]\r\ninfo: [debug] [BOOTSTRAP] [debug] Registered crash watchers.\r\ninfo: [debug] [BOOTSTRAP] [debug] Client connected\r\ninfo: [debug] [BOOTSTRAP] [debug] Got data from client: {\"cmd\":\"action\",\"action\":\"compressedLayoutHierarchy\",\"params\":{\"compressLayout\":false}}\r\ninfo: [debug] [BOOTSTRAP] [debug] Got command of type ACTION\r\ninfo: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy\r\ninfo: [debug] [BOOTSTRAP] [debug] Returning result: {\"value\":false,\"status\":0}\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 shell \"am start -n io.appium.settings/.Settings -e wifi on -e data on\"\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 wait-for-device\r\ninfo: [debug] Stopping logcat capture\r\ninfo: [debug] Logcat terminated with code null, signal SIGTERM\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 kill-server\r\ninfo: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 wait-for-device\r\ninfo: [debug] UiAutomator exited\r\ninfo: error sending command, reconnecting device and retrying: wait-for-device\r\ninfo: [debug] Trying to find a connected android device\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] Could not find devices, restarting adb server...\r\ninfo: [debug] Retrying restartAdb\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 kill-server\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: error sending command, reconnecting device and retrying: devices\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 kill-server\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] Trying to find a connected android device\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 wait-for-device\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 shell \"echo 'ready'\"\r\ninfo: [debug] Starting logcat capture\r\ninfo: [debug] Logcat terminated with code 0, signal null\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 wait-for-device\r\ninfo: error sending command, reconnecting device and retrying: wait-for-device\r\ninfo: [debug] Trying to find a connected android device\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 devices\r\ninfo: [debug] 1 device(s) connected\r\ninfo: [debug] Didn't get a new command in 60 secs, shutting down...\r\ninfo: Shutting down appium session\r\ninfo: [debug] Pressing the HOME button\r\ninfo: [debug] executing cmd: /Users/kumarg/Downloads/android-sdk-macosx/platform-tools/adb -s T065000751 shell \"input keyevent 3\"\r\ninfo: [debug] Stopping logcat capture\r\ninfo: [debug] Logcat already stopped\r\ninfo: [debug] Sent shutdown command, waiting for UiAutomator to stop...\r\ninfo: <-- POST /wd/hub/session/5b9e0249-1ab5-4359-96dd-98fb547f04f7/network_connection - - ms - -\r\ninfo: --> POST /wd/hub/session/5b9e0249-1ab5-4359-96dd-98fb547f04f7/network_connection {\"name\":\"network_connection\",\"parameters\":{\"type\":6}}\r\ninfo: <-- POST /wd/hub/session/5b9e0249-1ab5-4359-96dd-98fb547f04f7/network_connection 404 0.889 ms - 40\r\ninfo: [debug] Didn't get a new command in 60 secs, shutting down...\r\ninfo: [debug] Trying to stop appium but there's no session, doing nothing\r\ninfo: [debug] We shut down because no new commands came in"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/113249965","html_url":"https://github.com/appium/appium/issues/5272#issuecomment-113249965","issue_url":"https://api.github.com/repos/appium/appium/issues/5272","id":113249965,"user":{"login":"moizjv","id":1308607,"avatar_url":"https://avatars.githubusercontent.com/u/1308607?v=3","gravatar_id":"","url":"https://api.github.com/users/moizjv","html_url":"https://github.com/moizjv","followers_url":"https://api.github.com/users/moizjv/followers","following_url":"https://api.github.com/users/moizjv/following{/other_user}","gists_url":"https://api.github.com/users/moizjv/gists{/gist_id}","starred_url":"https://api.github.com/users/moizjv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moizjv/subscriptions","organizations_url":"https://api.github.com/users/moizjv/orgs","repos_url":"https://api.github.com/users/moizjv/repos","events_url":"https://api.github.com/users/moizjv/events{/privacy}","received_events_url":"https://api.github.com/users/moizjv/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T18:26:10Z","updated_at":"2015-06-18T18:26:10Z","body":"@gauravgandhi15 so there are multiple appium servers on same machine connected to multiple devices? I am unable to understand setup"}}