{"action":"opened","issue":{"url":"https://api.github.com/repos/appium/appium/issues/5858","labels_url":"https://api.github.com/repos/appium/appium/issues/5858/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/5858/comments","events_url":"https://api.github.com/repos/appium/appium/issues/5858/events","html_url":"https://github.com/appium/appium/issues/5858","id":118482090,"number":5858,"title":"Appium fails to execute any commands after establishing a session with a mobile browser","user":{"login":"WilHall","id":342826,"avatar_url":"https://avatars.githubusercontent.com/u/342826?v=3","gravatar_id":"","url":"https://api.github.com/users/WilHall","html_url":"https://github.com/WilHall","followers_url":"https://api.github.com/users/WilHall/followers","following_url":"https://api.github.com/users/WilHall/following{/other_user}","gists_url":"https://api.github.com/users/WilHall/gists{/gist_id}","starred_url":"https://api.github.com/users/WilHall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilHall/subscriptions","organizations_url":"https://api.github.com/users/WilHall/orgs","repos_url":"https://api.github.com/users/WilHall/repos","events_url":"https://api.github.com/users/WilHall/events{/privacy}","received_events_url":"https://api.github.com/users/WilHall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-23T21:58:51Z","updated_at":"2015-11-23T21:58:51Z","closed_at":null,"body":"Using Appium v1.4.16 in a fresh environment running OS X El Capitan v10.11.1, I am seeing an issue when trying to test native browsers on Android and iOS where Appium successfully opens the browser in the simulator, but after loading the initial page, just times out and disconnects.\r\n\r\nI have tried a clean install of the entire environment, and I am seeing the same issue. I have another environment (my personal development environment) in which appium runs successfully, even if connected to the same Selenium Grid.\r\n\r\nThere doesn't seem to be enough information in the Appium logs (see below) to debug the exact cause of this.\r\n\r\nI am running appium with the following command/options:\r\n/usr/local/bin/appium --nodeconfig \"appium-native.json\" --log \"appium-native.log\" --command-timeout \"7200\" --automation-name \"Appium\" --debug-log-spacing --show-ios-log --default-device\r\n\r\nAnd my configuration file is:\r\n{\r\n    \"capabilities\": [\r\n        {\r\n            \"platformName\": \"iOS\",\r\n            \"browserName\": \"Safari\"\r\n\r\n        },\r\n        {\r\n            \"platformName\": \"Android\",\r\n            \"browserName\": \"Browser\"\r\n        }\r\n    ],\r\n    \"configuration\": {\r\n        \"cleanUpCycle\": 2000,\r\n        \"timeout\": 30000,\r\n        \"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",\r\n        \"url\": \"http://192.168.1.201:4723/wd/hub\",\r\n        \"host\": \"192.168.1.201\",\r\n        \"port\": 4723,\r\n        \"maxSession\": 10,\r\n        \"register\": true,\r\n        \"registerCycle\": 5000,\r\n        \"hubPort\": 4444,\r\n        \"hubHost\": \"192.168.1.203\"\r\n    }\r\n}\r\n\r\nThe logs from a single session are below:\r\n}}}\r\ninfo: --> POST /wd/hub/session {\"desiredCapabilities\":{\"emulator\":true,\"build\":\"Test\",\"name\":\"TestingTest with data set #0\",\"browserName\":\"Browser\",\"project\":\"Test\",\"platformName\":\"Android\",\"deviceName\":\"Testing\"}}\r\ninfo: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_65)\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: ****        NEW SESSION           ***\r\ninfo: ****        NEW SESSION           ***\r\ninfo: ****        NEW SESSION           ***\r\ninfo: ****        NEW SESSION           ***\r\ninfo: ****        NEW SESSION           ***\r\ninfo: ****        NEW SESSION           ***\r\ninfo: ****        NEW SESSION           ***\r\ninfo: ****        NEW SESSION           ***\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: *************************************\r\ninfo: Set mode: Proxying straight through to Chromedriver\r\ninfo: [debug] Looks like we want chrome on android\r\ninfo: [debug] Creating new appium session 611946c6-b377-4c1d-a34b-e6ad4f894e30\r\ninfo: [debug] Checking whether adb is present\r\ninfo: [debug] Using adb from /opt/sdk/platform-tools/adb\r\ninfo: [debug] Using fast reset? true\r\ninfo: [debug] Preparing device for session\r\ninfo: [debug] Not checking whether app is present since we are assuming it's already on the device\r\ninfo: Retrieving device\r\ninfo: [debug] Trying to find a connected android device\r\ninfo: [debug] Getting connected devices...\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb devices\r\ninfo: [debug] 1 device(s) connected\r\ninfo: Found device 192.168.56.101:5555\r\ninfo: [debug] Setting device id to 192.168.56.101:5555\r\ninfo: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 wait-for-device\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 shell \"echo 'ready'\"\r\ninfo: [debug] Starting logcat capture\r\ninfo: [debug] Pushing unlock helper app to device...\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 install \"/usr/local/avm/versions/1.4.8/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk\"\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 shell \"dumpsys window\"\r\ninfo: [debug] Screen already unlocked, continuing.\r\ninfo: [debug] Forwarding system:4724 to device:4724\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 forward tcp:4724 tcp:4724\r\ninfo: [debug] Pushing appium bootstrap to device...\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 push \"/usr/local/avm/versions/1.4.8/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar\" /data/local/tmp/\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: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 shell \"ps 'uiautomator'\"\r\ninfo: [debug] No matching processes found\r\ninfo: [debug] Running bootstrap\r\ninfo: [debug] spawning: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.android.browser -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: [\"getDataDir\",{}]\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\":\"getDataDir\",\"params\":{}}\r\ninfo: [debug] [BOOTSTRAP] [debug] Got command of type ACTION\r\ninfo: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir\r\ninfo: [debug] [BOOTSTRAP] [debug] Returning result: {\"status\":0,\"value\":\"\\/data\"}\r\ninfo: [debug] dataDir set to: /data\r\ninfo: Chromedriver: Set chromedriver binary as: /usr/local/avm/versions/1.4.8/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver\r\ninfo: Chromedriver: Killing any old chromedrivers, running: ps -ef | grep /usr/local/avm/versions/1.4.8/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver | grep -v grep |grep -e '--port=9515\\(\\s.*\\)\\?$' | awk '{ print $2 }' | xargs kill -15\r\ninfo: Chromedriver: Successfully cleaned up old chromedrivers\r\ninfo: Chromedriver: Spawning chromedriver with: /usr/local/avm/versions/1.4.8/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver --url-base=wd/hub --port=9515\r\ninfo: Chromedriver: [STDOUT] Starting ChromeDriver 2.15.322455 (ae8db840dac8d0c453355d3d922c91adfb61df8f) on port 9515\r\nOnly local connections are allowed.\r\ninfo: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body\r\ninfo: JSONWP Proxy: Got response with status 200: {\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Mac OS X\",\"version\":\"10.11.1\"}}}\r\ninfo: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {\"desiredCapabilities\":{\"chromeOptions\":{\"androidPackage\":\"com.android.browser\",\"androidActivity\":\"com.android.browser.BrowserActivity\",\"androidDeviceSerial\":\"192.168.56.101:5555\"}}}\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"611946c6-b377-4c1d-a34b-e6ad4f894e30\"}\r\ninfo: <-- GET /wd/hub/status 200 2.210 ms - 155 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"611946c6-b377-4c1d-a34b-e6ad4f894e30\"}\r\ninfo: JSONWP Proxy: Got response with status 200: {\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\",\"status\":0,\"value\":{\"acceptSslCerts\":true,\"applicationCacheEnabled\":false,\"browserConnectionEnabled\":false,\"browserName\":\"chrome\",\"chrome\":{},\"cssSelect...\r\ninfo: [debug] Overriding session id with \"68ea96c046a63c928be73b31c47635b9\"\r\ninfo: [debug] Device launched! Ready for commands\r\ninfo: [debug] Setting command timeout to the default of 7200 secs\r\ninfo: [debug] Appium session started with sessionId 68ea96c046a63c928be73b31c47635b9\r\ninfo: <-- POST /wd/hub/session 303 5859.354 ms - 70 \r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: <-- GET /wd/hub/status 200 1.711 ms - 151 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: <-- GET /wd/hub/status 200 1.309 ms - 151 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: <-- GET /wd/hub/status 200 1.368 ms - 151 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: <-- GET /wd/hub/status 200 2.771 ms - 151 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: <-- GET /wd/hub/status 200 1.372 ms - 151 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: <-- GET /wd/hub/status 200 1.422 ms - 151 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}},\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: --> DELETE /wd/hub/session/68ea96c046a63c928be73b31c47635b9 {}\r\ninfo: Shutting down appium session\r\ninfo: JSONWP Proxy: Proxying [DELETE /] to [DELETE http://127.0.0.1:9515/wd/hub/session/68ea96c046a63c928be73b31c47635b9] with no body\r\ninfo: JSONWP Proxy: Got response with status 200: {\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\",\"status\":0,\"value\":null}\r\ninfo: [debug] Sent shutdown command, waiting for UiAutomator to stop...\r\ninfo: [debug] [BOOTSTRAP] [debug] Got data from client: {\"cmd\":\"shutdown\"}\r\ninfo: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN\r\ninfo: [debug] [BOOTSTRAP] [debug] Returning result: {\"status\":0,\"value\":\"OK, shutting down\"}\r\ninfo: [debug] [BOOTSTRAP] [debug] Closed client connection\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.\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: 0\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=\r\ninfo: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.\r\ninfo: [debug] [UIAUTOMATOR STDOUT] Time: 35.791\r\ninfo: [debug] [UIAUTOMATOR STDOUT] OK (1 test)\r\ninfo: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1\r\ninfo: [debug] UiAutomator shut down normally\r\ninfo: [debug] executing cmd: /opt/sdk/platform-tools/adb -s 192.168.56.101:5555 shell \"am force-stop com.android.browser\"\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}}}\r\ninfo: <-- GET /wd/hub/status 200 1.660 ms - 104 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}}}\r\ninfo: [debug] Stopping logcat capture\r\ninfo: [debug] Logcat terminated with code null, signal SIGTERM\r\ninfo: [debug] Cleaning up appium session\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":null,\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: <-- DELETE /wd/hub/session/68ea96c046a63c928be73b31c47635b9 200 805.839 ms - 72 {\"status\":0,\"value\":null,\"sessionId\":\"68ea96c046a63c928be73b31c47635b9\"}\r\ninfo: --> GET /wd/hub/status {}\r\ninfo: [debug] Responding to client with success: {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}}}\r\ninfo: <-- GET /wd/hub/status 200 1.102 ms - 104 {\"status\":0,\"value\":{\"build\":{\"version\":\"1.4.8\",\"revision\":\"c8179bd8352d3c62d98fa58b324491230df9342a\"}}}\r\n\r\n"}}