Can't launch appium inspector on Android device

2,676 views
Skip to first unread message

Tetiana

unread,
Dec 18, 2013, 9:48:49 AM12/18/13
to appium-...@googlegroups.com
Hi,
I am rather new to appium. So I try to run tests on iOS emulator and it is run as expected.

When I try to run tests on Android, from UI appium app, emulator isn't starting, so I can't inspect elements. On my Android device test doesn't start also, but I think the reason is in android 4.1.3 (as I understood we can't run on real devices pre 4.2) I also created an emulator Nexus with Android 4.2 in AVD Manager and try to run on it.

So I have everything pointed like on screenshot:

After this my emulator doesn't open. Can somebody help me to load emulator.

Thanks) 


 

Jonathan Lipps

unread,
Dec 18, 2013, 11:45:19 AM12/18/13
to Tetiana, appium-...@googlegroups.com
Start the emulator on your own instead of with the 'Launch AVD' box.

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Vignesh Radhakrishna

unread,
Dec 20, 2013, 7:32:01 AM12/20/13
to appium-...@googlegroups.com
You can better use UIAutomator rather than using appium inspector , it gives id and other resources needed to find an element. 

Tetiana

unread,
Dec 20, 2013, 11:04:10 AM12/20/13
to appium-...@googlegroups.com
Thanks Jonathan,

I started emulator manually and inspector works. But some elements of my application haven't names.

Thanks Vignesh, will try to use UIAutomation, I think it will works better. But for now I am using Selendroid and it's inspector for finding elements and run tests.

defonus

unread,
Mar 26, 2014, 6:07:24 AM3/26/14
to appium-...@googlegroups.com
Hello, I'm also can't start Inspector for Android app.

I'm using appium 0.17.6


All Checks were successful but after click 'Launch' error appeared %(



Running iOS Checks


Xcode is installed at /Applications/Xcode.app/Contents/Developer


Xcode Command Line Tools are installed.


DevToolsSecurity is enabled.


The Authorization DB is set up properly.


Node binary found at /usr/local/bin/node


iOS Checks were successful.


Running Android Checks


ANDROID_HOME is set to "/users/user/Downloads/adt-bundle-mac-x86_64-20131030/sdk/"

JAVA_HOME is set to "/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home."

ADB exists at /users/user/Downloads/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb

Android exists at /users/user/Downloads/adt-bundle-mac-x86_64-20131030/sdk/tools/android


Emulator exists at /users/user/Downloads/adt-bundle-mac-x86_64-20131030/sdk/tools/emulator

Android Checks were successful.


All Checks were successful


info: Starting Appium in pre-launch mode


info: Pre-launching app

info: Using local app from command line: /Users/user/work/mobileshopper-android.apk

info: Creating new appium session 2bdc9ff5-15ab-4918-9cd5-3996eabe72e7

info: Starting android appium


debug: Using fast reset? true


info: Preparing device for session

info: Checking whether app is actually present

info: Checking whether adb is present

info: Sent shutdown command, waiting for UiAutomator to stop...


warn: UiAutomator did not shut down fast enough, calling it gone

error: Could not pre-launch appium: Error: Could not find adb in tools, platform-tools, or supported build-tools under "export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/users/user/Downloads/adt-bundle-mac-x86_64-20131030/sdk/tools:/users/user/Downloads/adt-bundle-mac-x86_64-20131030/sdk/platform-tools:/users/user/Downloads/apache-maven-3.1.1/bin:/users/user/Downloads/adt-bundle-mac-x86_64-20131030/sdk/"; do you have android SDK or build-tools installed into this location? Supported build tools are: 17.0.0, 18.0.1, 19.0.0, 19.0.1, android-4.2.2, android-4.3, android-4.4



пятница, 20 декабря 2013 г., 19:04:10 UTC+3 пользователь Tetiana написал:

defonus

unread,
Mar 26, 2014, 6:10:20 AM3/26/14
to appium-...@googlegroups.com
I'm using API level 19 on emulator

среда, 26 марта 2014 г., 13:07:24 UTC+3 пользователь defonus написал:

defonus

unread,
Mar 26, 2014, 6:24:37 AM3/26/14
to appium-...@googlegroups.com

When All checks was removed from Appium Preferences - Gneral tab I have another error:

AVD launched. I click 'Launch' button and then click 'I' (Inspector)

info: Welcome to Appium v0.17.6 (REV 7b32947e166a4338047f31ac14457c2b0eb432aa)


info: Appium REST http interface listener started on 0.0.0.0:4723

   info  - socket.io started


info: Non-default server args: {"app":"/Users/user/work/mobileshopper-android.apk","keepArtifacts":true,"noReset":true,"merciful":true,"androidPackage":"org.pack","androidActivity":".activities.SplashActivity"}


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Appium request initiated at /wd/hub/status


GET /wd/hub/status 200 8ms - 144b


debug: Request received with params: {}


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}


GET /wd/hub/status 200 2ms - 144b


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}

debug: Appium request initiated at /wd/hub/sessions

debug: Request received with params: {}

debug: Appium request initiated at /wd/hub/session

debug: Request received with params: {"desiredCapabilities":{"device":"iPhone Retina (4-inch)"}}

error: Using local app, but didn't end in .zip, .ipa or .app

error: Failed to start an Appium session, err was: Error: Using local app, but didn't end in .zip, .ipa or .app


GET /wd/hub/status 200 0ms - 144b

info: Responding to client with success: {"status":0,"value":[]}

GET /wd/hub/sessions 200 1ms - 32b

warn: [DEPRECATED] The device capability has been deprecated and will be removed.  Please use the platformName capability instead.

info: Got configuration error, not starting session

info: Cleaning up appium session

info: Error: Using local app, but didn't end in .zip, .ipa or .app

    at Device.configureLocalApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/device.js:77:8)

    at Device.configureApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/device.js:44:10)

    at IOS.configureApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:135:8)

    at IOS.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:110:17)

    at Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:240:15)

    at Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:81:10)

    at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:147:16)

    at callbacks (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:164:37)

    at param (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:138:11)

    at pass (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:145:5)

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Using local app, but didn't end in .zip, .ipa or .app)","origValue":"Using local app, but didn't end in .zip, .ipa or .app"},"sessionId":null}

POST /wd/hub/session 500 10ms - 256b


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}


GET /wd/hub/status 200 1ms - 144b


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}


GET /wd/hub/status 200 0ms - 144b




среда, 26 марта 2014 г., 13:10:20 UTC+3 пользователь defonus написал:

Patrick L

unread,
Mar 26, 2014, 11:06:15 AM3/26/14
to appium-...@googlegroups.com
Defonus, it looks like in your last post you are trying to start an iOS app and not an android apk. You have something wrong with your configs...

In your previous posts you dont have a connection to your android sdk anywhere. I would suggest either moving the sdk to a location where your path is, or create a symlink to the adb in your bin folder where the path is looking

Jonathan Lipps

unread,
Mar 26, 2014, 1:38:32 PM3/26/14
to defonus, appium-...@googlegroups.com
Looks like ANDROID_HOME is set but it's not a correct path. What happens if you do:

echo $ANDROID_HOME

?

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.

defonus

unread,
Mar 27, 2014, 6:50:45 AM3/27/14
to appium-...@googlegroups.com, defonus
Hello. A deleted all =) (appium, android studio ant etc.) and re-install again. Also I'm re-install appium17.6

Now I'm try to run inspector for my android app.

Step to reproduce:
Launch Appium GUI
Unchecked all check-boxes at 'Appium Preferences - General'
Checked and set necessary values for  'Package' and 'Activity'
Running iOS Checks


Xcode is installed at /Applications/Xcode.app/Contents/Developer


Xcode Command Line Tools are installed.


DevToolsSecurity is enabled.


The Authorization DB is set up properly.


Node binary found at /usr/local/bin/node

iOS Checks were successful.


Running Android Checks

ANDROID_HOME is set to "/Applications/Android Studio.app/sdk"

JAVA_HOME is set to "/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home."

ADB exists at /Applications/Android Studio.app/sdk/platform-tools/adb

Android exists at /Applications/Android Studio.app/sdk/tools/android

Emulator exists at /Applications/Android Studio.app/sdk/tools/emulator

Android Checks were successful.

All Checks were successful


After that click 'Launch' button.

info: Welcome to Appium v0.17.6 (REV 7b32947e166a4338047f31ac14457c2b0eb432aa)


info: Appium REST http interface listener started on 0.0.0.0:4723

   info  - socket.io started


info: Non-default server args: {"app":"/Users/andrei_tsiarenia/work/mobileshopper-android.apk","udid":"3eaf295d2a8e5f423f7a3cd52f289c650679af24","keepArtifacts":true,"noReset":true,"merciful":true,"androidPackage":"org.consumerreports","androidActivity":".activities.SplashActivity"}


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Appium request initiated at /wd/hub/status


GET /wd/hub/status 200 10ms - 144b


debug: Request received with params: {}


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}


GET /wd/hub/status 200 2ms - 144b


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}


GET /wd/hub/status 200 1ms - 144b


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}


GET /wd/hub/status 200 1ms - 144b


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}



And finally I click I (Inspector) 


debug: Request received with params: {}

debug: Appium request initiated at /wd/hub/sessions

debug: Request received with params: {}

debug: Appium request initiated at /wd/hub/session

debug: Request received with params: {"desiredCapabilities":{"device":"iPhone Retina (4-inch)"}}

error: Using local app, but didn't end in .zip, .ipa or .app

error: Failed to start an Appium session, err was: Error: Using local app, but didn't end in .zip, .ipa or .app


GET /wd/hub/status 200 1ms - 144b

info: Responding to client with success: {"status":0,"value":[]}

GET /wd/hub/sessions 200 1ms - 32b

warn: [DEPRECATED] The device capability has been deprecated and will be removed.  Please use the platformName capability instead.

info: Got configuration error, not starting session

info: Cleaning up appium session

info: Error: Using local app, but didn't end in .zip, .ipa or .app

    at Device.configureLocalApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/device.js:77:8)

    at Device.configureApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/device.js:44:10)

    at IOS.configureApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:135:8)

    at IOS.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:110:17)

    at Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:240:15)

    at Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:81:10)

    at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:147:16)

    at callbacks (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:164:37)

    at param (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:138:11)

    at pass (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:145:5)

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Using local app, but didn't end in .zip, .ipa or .app)","origValue":"Using local app, but didn't end in .zip, .ipa or .app"},"sessionId":null}

POST /wd/hub/session 500 14ms - 256b


debug: Appium request initiated at /wd/hub/status


info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}


debug: Request received with params: {}


GET /wd/hub/status 200 0ms - 144b  




Really I can't understand why my log contains iPhone info ... if I try run Android app (Android emulator was started before launch Inspector ... also I try start Appium GUI with 'Launch AVD' - I have the same error)

debug: Request received with params: {"desiredCapabilities":{"device":"iPhone Retina (4-inch)"}}

error: Using local app, but didn't end in .zip, .ipa or .app


Do you know any way for starting Inspector for Android app?


среда, 26 марта 2014 г., 20:38:32 UTC+3 пользователь Jonathan Lipps написал:

Kamesh Raj Velu

unread,
Mar 27, 2014, 11:26:20 AM3/27/14
to defonus, appium-...@googlegroups.com
I have the same issue. To over come this i don't launch my app through appium.app !!!
I start appium using my ruby code and use remote server in appium.app (you have to enable developer settings)

Regarding appium not showing UI elements for Android and shows only screen shoot: I had to enable compressXML setting for appium to see my elements. Again this can't be done through appium.app can be done only by your script

I wish the appium.app developer could enable these options and make appium.app work by itself

--
 --------------------------------------------
 __0/  "A ten thousand miles journey begins
   /_    with a single step. That single step
`\/  \,  has to be taken from where you are"

http://www.kameshraj.com

bootstrap online

unread,
Mar 27, 2014, 11:36:26 AM3/27/14
to Kamesh Raj Velu, defonus, appium-...@googlegroups.com

Jonathan Lipps

unread,
Mar 27, 2014, 1:26:58 PM3/27/14
to bootstrap online, Kamesh Raj Velu, defonus, appium-...@googlegroups.com
Looks like whatever is kicking off the session is sending in iPhone as the device, but your app ends in .apk.

defonus

unread,
Mar 28, 2014, 10:22:22 AM3/28/14
to appium-...@googlegroups.com, bootstrap online, Kamesh Raj Velu, defonus
Is it appium bug?

четверг, 27 марта 2014 г., 20:26:58 UTC+3 пользователь Jonathan Lipps написал:

Jonathan Lipps

unread,
Mar 28, 2014, 11:15:54 AM3/28/14
to defonus, appium-...@googlegroups.com, bootstrap online, Kamesh Raj Velu
It's either an Appium.app bug, or you have iPhone selected as your device in the interface on accident.

ALEX DILLON

unread,
Mar 28, 2014, 4:12:46 PM3/28/14
to appium-...@googlegroups.com, defonus, bootstrap online, Kamesh Raj Velu
Hey Johnathan, it definitely seems to be an appium.app bug. I am running into the same issue and I am pointing app path to android apk. The app path works when i run tests from my java code but i want to open inspector.

Jonathan Lipps

unread,
Mar 28, 2014, 4:23:42 PM3/28/14
to ALEX DILLON, appium-...@googlegroups.com, defonus, bootstrap online, Kamesh Raj Velu
Do you have the "Android" tab selected in Appium.app?

Alex Dillon

unread,
Mar 28, 2014, 6:20:51 PM3/28/14
to Jonathan Lipps, appium-...@googlegroups.com, defonus, bootstrap online, Kamesh Raj Velu
Yes, it is.

Sent from my iPhone

Alex F

unread,
Apr 4, 2014, 6:12:43 PM4/4/14
to appium-...@googlegroups.com
Same issue for me. Appium is looking for an iOS app when all settings are pointing to Android. 


Any help would be appreciated. 

Michael Burnside

unread,
Apr 9, 2014, 3:56:33 PM4/9/14
to appium-...@googlegroups.com
We are running into this also after upgrading to Inspector 0.17.6 and 0.18.0. The inspector is incorrectly assuming that loading an android app has a desired capability attribute value of "iPhone"

All indications are that rendering an Android app in the Appium 0.18.0 Inspector has a major bug. Proof is in the debug from the STDOUT:

debug: 127.0.0.1 - - "GET /wd/hub/sessions HTTP/1.1" 200 32 "-" "Appium (unknown version) CFNetwork/673.2.1 Darwin/13.1.0 (x86_64) (MacBookPro10%2C1)"

debug: Appium request initiated at /wd/hub/session

debug: Request received with params: {"desiredCapabilities":{"device":"iPhone"}}

error: Using local app, but didn't end in .zip, .ipa or .app

error: Failed to start an Appium session, err was: Error: Bad app: <path_removed>/app1.apk. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: Error: Using local app, but didn't end in .zip, .ipa or .app

debug: 127.0.0.1 - - "POST /wd/hub/session HTTP/1.1" 500 792 "-" "Appium (unknown version) CFNetwork/673.2.1 Darwin/13.1.0 (x86_64) (MacBookPro10%2C1)" 

MarkBrew

unread,
Apr 14, 2014, 4:03:45 AM4/14/14
to appium-...@googlegroups.com
I would like to add my corroboration to this situation.   

Appium 0.18.0 seems to think I'm launching an iOS app on an iPad retina as well.

Frank Qian

unread,
May 21, 2014, 5:03:47 PM5/21/14
to appium-...@googlegroups.com
Hey if you still want to use the 0.18 appium and still in this issue, the way to resolve it is to select the prelunching app in the preference :D
Reply all
Reply to author
Forward
0 new messages