appium: Appium failed to create driver for native browser

Here is the code snippet

@Before public void setUp() throws Exception { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(“deviceName”, “emulator-5554”); capabilities.setCapability(“platformName”, “Android”); capabilities.setCapability(“platformVersion”, “4.4”); capabilities.setCapability(“browserName”, “Browser”); driver = new AndroidDriver(new URL(“http://127.0.0.1:4723/wd/hub”), capabilities); }

Appium was not able to complete setup and waited for the execution of

   driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),
            capabilities);

Here is the server stack trace:

info: Welcome to Appium v1.4.3 (REV a357c7fa73222315dd85c3d2dd8334767cca1b0d) info: Appium REST http interface listener started on 0.0.0.0:4723 info: Console LogLevel: debug info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformVersion”:“4.4”,“deviceName”:“emulator-5554”,“platformName”:“Android”,“browserName”:“Browser”}} info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5) info: Set mode: Proxying straight through to Chromedriver info: [debug] Looks like we want chrome on android info: [debug] Creating new appium session b8fb6fac-e3de-41cb-8d0d-f045c503195e info: [debug] Checking whether adb is present info: [debug] Using adb from /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb info: [debug] Using fast reset? true 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: Retrieving device info: [debug] Trying to find a connected android device info: [debug] Getting connected devices… info: [debug] executing cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb devices info: [debug] 1 device(s) connected info: Found device emulator-5554 info: [debug] Setting device id to emulator-5554 info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5) info: [debug] executing cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 wait-for-device info: [debug] executing cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 shell “echo ‘ready’” info: [debug] Starting logcat capture info: [debug] Pushing unlock helper app to device… info: [debug] executing cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 install “/home/spartans/.linuxbrew/lib/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk” info: [debug] executing cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 shell “dumpsys window” info: [debug] Screen already unlocked, continuing. info: [debug] Forwarding system:4724 to device:4724 info: [debug] executing cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 forward tcp:4724 tcp:4724 info: [debug] Pushing appium bootstrap to device… info: [debug] executing cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 push “/home/spartans/.linuxbrew/lib/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 cmd: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 shell “ps ‘uiautomator’” info: [debug] No matching processes found info: [debug] Running bootstrap info: [debug] spawning: /home/spartans/.linuxbrew/Cellar/android-sdk/24.2/platform-tools/adb -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.android.browser -e disableAndroidWatchers false info: [debug] [UIAUTOMATOR STDOUT] WARNING: linker: info: [debug] [UIAUTOMATOR STDOUT] libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix. 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] [BOOTSTRAP] [debug] Registered crash watchers. info: [debug] Pushing command to appium work queue: [“getDataDir”,{}] info: [debug] [BOOTSTRAP] [debug] Client connected info: [debug] dataDir set to: /data error: Unhandled error: TypeError: undefined is not a function at [object Object].ChromeAndroid.createSession (/home/spartans/.linuxbrew/lib/node_modules/appium/lib/devices/android/chrome.js:154:33) at /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:607:21 at /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:246:17 at iterate (/home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:146:13) at /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:157:25 at /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:248:21 at /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:612:34 at [object Object].<anonymous> (/home/spartans/.linuxbrew/lib/node_modules/appium/lib/devices/android/android.js:541:5) at next (/home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:798:43) at /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/async/lib/async.js:32:16 at [object Object].exports.respond (/home/spartans/.linuxbrew/lib/node_modules/appium/lib/devices/common.js:28:9) at [object Object].<anonymous> (/home/spartans/.linuxbrew/lib/node_modules/appium/lib/devices/android/android.js:507:16) at [object Object].<anonymous> (/home/spartans/.linuxbrew/lib/node_modules/appium/lib/devices/android/uiautomator.js:95:9) at Socket.emit (events.js:107:17) at readableAddChunk (_stream_readable.js:163:16) at Socket.Readable.push (_stream_readable.js:126:10) at TCP.onread (net.js:538:20) context: [POST /wd/hub/session {“desiredCapabilities”:{“platformVersion”:“4.4”,“deviceName”:“emulator-5554”,“platformName”:“Android”,“browserName”:“Browser”}}] 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”,“status”:0} info: Chromedriver: Set chromedriver binary as: /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 info: Chromedriver: Killing any old chromedrivers, running: ps -ef | grep /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 | grep -v grep |grep -e ‘–port=9515(\s.*)?$’ | awk ‘{ print $2 }’ | xargs kill -15 info: Chromedriver: Successfully cleaned up old chromedrivers info: Chromedriver: Spawning chromedriver with: /home/spartans/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 --url-base=wd/hub --port=9515 info: Chromedriver: [STDOUT] Starting ChromeDriver 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961) on port 9515 Only local connections are allowed. info: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body info: JSONWP Proxy: Got response with status 200: {“sessionId”:“”,“status”:0,“value”:{“build”:{“version”:“alpha”},“os”:{“arch”:“x86_64”,“name”:“Linux”,“version”:“3.13.0-43-generic”}}} info: 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”:“emulator-5554”}}} info: JSONWP Proxy: Got response with status 200: {“sessionId”:“cb9851250eff725dc5cd5faae8d5fa8b”,“status”:0,“value”:{“acceptSslCerts”:true,“applicationCacheEnabled”:false,“browserConnectionEnabled”:false,“browserName”:“chrome”,“chrome”:{},"cssSelect…

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

@laisportugal Can you create a new issue with your particular details? This one is so old that the particulars are almost certainly different.