Android - Appium doesn't work on the latest version (1.6.4)

Hi guys,

Help would be very much appreciated! Currently appium GUI 1.5.3 works fine on Android however when i ran the latest version 1.6.4 then i see the following error:

[Error: Error occured while starting App. Original error: com.thom.mythom.dev/com.tua.tda.activities.LauncherActivity or com.thom.mythom.dev.com.tua.tda.activities.LauncherActivity never started]
[debug] [AndroidDriver] Shutting down Android driver
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/paridbego/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“00588732”,“shell”,“am”,“force-stop”,“com.thom.mythom.dev”]
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/paridbego/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“00588732”,“shell”,“input”,“keyevent”,3]
[debug] [ADB] Uninstalling com.thom.mythom.dev
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/paridbego/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“00588732”,“shell”,“am”,“force-stop”,“com.thom.mythom.dev”]
[debug] [ADB] Running ‘/Users/paridbego/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“00588732”,“uninstall”,“com.thom.mythom.dev”]
[ADB] App was uninstalled
[debug] [AndroidBootstrap] Sending command to android: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“value”:“OK, shutting down”,“status”:0}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state ‘stopping’
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 33.527
[debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state ‘stopped’
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/paridbego/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“00588732”,“shell”,“ps”]
[ADB] No uiautomator process found to kill, continuing…
[debug] [UiAutomator] Moving to state ‘stopped’
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/paridbego/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“00588732”,“shell”,“am”,“force-stop”,“io.appium.unlock”]
[debug] [AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[MJSONWP] Encountered internal error running command: Error: Error occured while starting App. Original error: com.thom.mythom.dev/com.tua.tda.activities.LauncherActivity or com.thom.mythom.dev.com.tua.tda.activities.LauncherActivity never started
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at ADB.callee$0$0$ (…/…/…/lib/tools/apk-utils.js:77:9)
at tryCatch (/Users/paridbego/.nvm/versions/node/v5.12.0/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/paridbego/.nvm/versions/node/v5.12.0/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/paridbego/.nvm/versions/node/v5.12.0/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/paridbego/.nvm/versions/node/v5.12.0/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Users/paridbego/.nvm/versions/node/v5.12.0/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:108:47)
at /Users/paridbego/.nvm/versions/node/v5.12.0/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:119:28
at flush (/Users/paridbego/.nvm/versions/node/v5.12.0/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[HTTP] <-- POST /wd/hub/session 500 71164 ms - 335

Current capabilities

public static void samsungS4MiniSetup() throws MalformedURLException {
caps.setCapability(“deviceName”, prop.getProperty(“samsungS4Mini_device_name”));
caps.setCapability(“app”, System.getProperty(“user.dir”) + buildPath + “.apk”);

}

I’m i missing any capabilities for version 1.6.4?

Thank you in advance!

Can you please try adding following 2 capabilities
capabilities.setCapability(“appPackage”, “com.thom.mythom.dev”);
capabilities.setCapability(“appActivity”, “com.thom.mythom.dev.com.tua.tda.activities.LauncherActivity”);

Alternatively there is an app that can tell you package name and init activity for the app under test. Is there any location alert or other pop up message at start of the app?

1 Like