Unable to create a chrome session on android device in Appium pre-launch mode

Hi,
I couldn’t create a chrome driver session in Appium prelaunch mode on Android device. Following are the Appium settings and server logs for your reference.
Please help!


info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app
info: Set mode: Proxying straight through to Chromedriver
info: [debug] Looks like we want chrome on android
info: [debug] Creating new appium session 0ae81fea-8788-44e3-874f-aca3a97c4b37
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: [debug] Checking whether adb is present

info: [debug] Using adb from /Users/malathikosaraju/software/android-sdk/platform-tools/adb
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” devices

info: [debug] 1 device(s) connected

info: Found device 0736c0c40b304c25
info: [debug] Setting device id to 0736c0c40b304c25

info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” -s 0736c0c40b304c25 wait-for-device

info: [debug] executing: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” -s 0736c0c40b304c25 shell “echo ‘ready’”

info: [debug] Starting logcat capture

info: [debug] Pushing unlock helper app to device…

info: [debug] executing: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” -s 0736c0c40b304c25 install “/Applications/Appium.app/Contents/Resources/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk”

info: [debug] executing: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” -s 0736c0c40b304c25 shell “dumpsys window”

info: [debug] Writing dumpsys output to /Applications/Appium.app/Contents/Resources/node_modules/appium/.dumpsys.log

info: [debug] Screen already unlocked, continuing.
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” -s 0736c0c40b304c25 forward tcp:4724 tcp:4724

info: [debug] Pushing appium bootstrap to device…

info: [debug] executing: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” -s 0736c0c40b304c25 push “/Applications/Appium.app/Contents/Resources/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: “/Users/malathikosaraju/software/android-sdk/platform-tools/adb” -s 0736c0c40b304c25 shell “ps ‘uiautomator’”

info: [debug] No matching processes found

info: [debug] Running bootstrap
info: [debug] spawning: /Users/malathikosaraju/software/android-sdk/platform-tools/adb -s 0736c0c40b304c25 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap

info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1

info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1

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] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
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: {“value”:“/data/local/tmp”,“status”:0}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Creating Chrome session
info: [debug] Set chromedriver binary as: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/chromedriver/mac/chromedriver
info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: ps -ef | grep /Applications/Appium.app/Contents/Resources/node_modules/appium/build/chromedriver/mac/chromedriver | grep -v grep |grep -e ‘–port=9515$’ | awk ‘{ print $2 }’ | xargs kill -15

info: [debug] Successfully cleaned up old chromedrivers

info: [debug] Spawning chromedriver with: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/chromedriver/mac/chromedriver

info: [debug] [CHROMEDRIVER] Starting ChromeDriver (v2.10.267517) on port 9515
Only local connections are allowed.

info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session",“method”:“POST”,“json”:{“sessionId”:null,“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.android.browser”,“androidActivity”:“com.android.browser.BrowserActivity”,“androidDeviceSerial”:"0736c0c40b304c25”}}}}

info: [debug] Cleaning up appium session

error: Chromedriver create session did not work. Status was 200 and body was {“sessionId”:“c1c27a8011efbfe87ea2c90c2191bc29”,“status”:13,“value”:{“message”:“unknown error: com.android.browser is not installed on device 0736c0c40b304c25\n (Driver info: chromedriver=2.10.267517,platform=Mac OS X 10.9.4 x86_64)”}}

error: Could not pre-launch appium: Error: Did not get session redirect from Chromedriver

Thanks In advance.
Malathi