Unable to start application which was working earlier


#1

Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to start app at: ‘c:\dell\DellDataGuardian-arc-debug-2.4.0.0.apk’
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)
at App start.run(App start:16)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:331)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1554289093282.run(TempTestCase1554289093282.groovy:21)


#2

Hi @kundaganesh,

Can you confirm a couple of things?

Hope this helps,

Chris


#3

Hi Chris,
I’m using Appium 1.8.1 only and I have given custom desired capability in project setting-custom added new package and activity name for the app but still im getting same. Some times Appium is failed to start server also.


#4

Hi @kundaganesh,

Something I’ve encountered on MacOS is that Appium processes sometimes hang around after the tests are complete, making it difficult for new tests to start. I’m not sure if the same thing happens on Windows, but you could try looking at your running system processes for anything Appium related and stop those. Restarting your computer, although not ideal, might help as well. If it’s still consistently an issue after trying those things, let me know and we can try to troubleshoot further.

– Chris


#5

Hi Chris,

Please find below log for the error

2019-04-04 12:13:56.180 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor   -e[0;39m e[39m--------------------e[0;39m
2019-04-04 12:13:56.196 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor   -e[0;39m e[39mSTART Test Cases/APP Install/App starte[0;39m
2019-04-04 12:13:56.738 e[39mDEBUGe[0;39m e[36mtestcase.App start                       -e[0;39m e[39m1: startApplication("C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk", false)e[0;39m
2019-04-04 12:13:56.993 e[34mINFO e[0;39m e[36mc.k.k.c.m.k.i.MobileDriverFactory        -e[0;39m e[39mUser set preference: ['appPackage', 'com.dell.securelifecycle']e[0;39m
2019-04-04 12:13:56.994 e[34mINFO e[0;39m e[36mc.k.k.c.m.k.i.MobileDriverFactory        -e[0;39m e[39mUser set preference: ['appActivity', 'com.dell.ddgmobilesdk.AWServerSelectionActivity']e[0;39m
2019-04-04 12:13:56.994 e[34mINFO e[0;39m e[36mc.k.k.c.m.k.i.MobileDriverFactory        -e[0;39m e[39mUser set preference: ['deviceId', 'ZY2245TFLB']e[0;39m
2019-04-04 12:14:02.367 e[34mINFO e[0;39m e[36mc.k.k.c.a.driver.AppiumDriverManager     -e[0;39m e[39mAppium server started on port 63,445e[0;39m
e[35m[Appium]e[39m Welcome to Appium v1.8.1
e[35m[Appium]e[39m Non-default server args:
e[35m[Appium]e[39m   port: 63445
e[35m[Appium]e[39m   loglevel: info
e[35m[Appium]e[39m   chromeDriverPort: 63446
e[35m[Appium]e[39m   tmpDir: C:\Users\GANESH~1\AppData\Local\Temp\\Katalon\Appium\Temp1554360237006
e[35m[Appium]e[39m Appium REST http interface listener started on 0.0.0.0:63445
e[35m[HTTP]e[39m e[37m-->e[39m e[37mGETe[39m e[37m/wd/hub/statuse[39m
e[35m[HTTP]e[39m e[90m{}e[39m
e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/status e[39me[32m200e[39m e[90m131 ms - 83e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37m-->e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m
e[35m[HTTP]e[39m e[90m{"desiredCapabilities":{"app":"C:\\Users\\ganesh_kunda\\Desktop\\builds\\DellDataGuardian-universal-debug-2.6.1.0.apk","appActivity":"com.dell.ddgmobilesdk.AWServerSelectionActivity","appPackage":"com.dell.securelifecycle","autoGrantPermissions":true,"automationName":"uiautomator2","deviceId":"ZY2245TFLB","deviceName":"motorola Moto G (5) Plus (Android 8.1.0)","fullReset":false,"newCommandTimeout":1800,"noReset":true,"platform":"ANDROID","platformName":"Android","udid":"ZY2245TFLB"},"capabilities":{"desiredCapabilities":{"app":"C:\\Users\\ganesh_kunda\\Desktop\\builds\\DellDataGuardian-universal-debug-2.6.1.0.apk","appActivity":"com.dell.ddgmobilesdk.AWServerSelectionActivity","appPackage":"com.dell.securelifecycle","autoGrantPermissions":true,"automationName":"uiautomator2","deviceId":"ZY2245TFLB","deviceName":"motorola Moto G (5) Plus (Android 8.1.0)","fullReset":false,"newCommandTimeout":1800,"noReset":true,"platform":"ANDROID","platformName":"Android","udid":"ZY2245TFLB"},"firstMate[39m
e[35m[Appium]e[39m Could not parse W3C capabilities: 'deviceName' can't be blank. Falling back to JSONWP protocol.
e[35m[Appium]e[39m The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["app","appActivity","appPackage","autoGrantPermissions","automationName","deviceId","deviceName","fullReset","newCommandTimeout","noReset","platform","platformName","udid"]. Falling back to JSONWP protocol.
e[35m[Appium]e[39m Creating new AndroidUiautomator2Driver (v1.12.0) session
e[35m[Appium]e[39m Capabilities:
e[35m[Appium]e[39m   app: C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk
e[35m[Appium]e[39m   appActivity: com.dell.ddgmobilesdk.AWServerSelectionActivity
e[35m[Appium]e[39m   appPackage: com.dell.securelifecycle
e[35m[Appium]e[39m   autoGrantPermissions: true
e[35m[Appium]e[39m   automationName: uiautomator2
e[35m[Appium]e[39m   deviceId: ZY2245TFLB
e[35m[Appium]e[39m   deviceName: motorola Moto G (5) Plus (Android 8.1.0)
e[35m[Appium]e[39m   fullReset: false
e[35m[Appium]e[39m   newCommandTimeout: 1800
e[35m[Appium]e[39m   noReset: true
e[35m[Appium]e[39m   platform: ANDROID
e[35m[Appium]e[39m   platformName: Android
e[35m[Appium]e[39m   udid: ZY2245TFLB
e[35m[BaseDriver]e[39m The following capabilities were provided, but are not recognized by appium: deviceId, platform.
e[35m[BaseDriver]e[39m Session created with session id: ae98e2b0-49dc-4a5f-818d-e355655c0489
e[35m[BaseDriver]e[39m Using local app 'C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk'
e[35m[AndroidDriver]e[39m Java version is: 1.8.0_181

e[35m[ADB]e[39m Checking whether adb is present
e[35m[ADB]e[39m Found 1 'build-tools' folders under 'C:\Users\ganesh_kunda\.katalon\tools\android_sdk' (newest first):
e[35m[ADB]e[39m     C:/Users/ganesh_kunda/.katalon/tools/android_sdk/build-tools/28.0.3
e[35m[ADB]e[39m Using adb.exe from C:\Users\ganesh_kunda\.katalon\tools\android_sdk\platform-tools\adb.exe
e[35m[AndroidDriver]e[39m Retrieving device list
e[35m[AndroidDriver]e[39m Using device: ZY2245TFLB
e[35m[ADB]e[39m Getting device platform version
e[35m[ADB]e[39m Using apksigner.bat from C:\Users\ganesh_kunda\.katalon\tools\android_sdk\build-tools\28.0.3\apksigner.bat
e[35m[ADB]e[39m Checking whether zipalign is present
e[35m[ADB]e[39m Using zipalign.exe from C:\Users\ganesh_kunda\.katalon\tools\android_sdk\build-tools\28.0.3\zipalign.exe
e[35m[ADB]e[39m io.appium.uiautomator2.server was successfully uninstalled
e[35m[ADB]e[39m io.appium.uiautomator2.server.test was successfully uninstalled
e[35m[ADB]e[39m Checking whether aapt is present
e[35m[ADB]e[39m Using aapt.exe from C:\Users\ganesh_kunda\.katalon\tools\android_sdk\build-tools\28.0.3\aapt.exe
e[35m[AndroidDriver]e[39m setDeviceLanguageCountry requires language or country.
e[35m[AndroidDriver]e[39m Got language: 'null' and country: 'null'
e[35m[ADB]e[39m Successfully extracted 2684 strings from 'C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk' resources for '(default)' configuration
e[35m[UiAutomator2]e[39m Starting uiautomator2 server 1.12.0
e[35m[UiAutomator2]e[39m Using UIAutomator2 server from 'C:\Users\ganesh_kunda\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk' and test from 'C:\Users\ganesh_kunda\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
e[35m[UiAutomator2]e[39m Running command: 'adb -s ZY2245TFLB shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'
e[35m[UiAutomator2]e[39m Waiting up to 20000ms for UiAutomator2 to be online...
e[35m[AndroidDriver]e[39m Screen already unlocked, doing nothing
e[35m[UiAutomator2]e[39m UiAutomator2 did not start the activity we were waiting for, 'com.dell.securelifecycle/com.dell.ddgmobilesdk.AWServerSelectionActivity'. Starting it ourselves
2019-04-04 12:14:37.800 e[34mINFO e[0;39m e[36mc.k.k.c.a.driver.AppiumDriverManager     -e[0;39m e[39mdeviceId = ZY2245TFLBe[0;39m
2019-04-04 12:14:37.801 e[34mINFO e[0;39m e[36mc.k.k.c.a.driver.AppiumDriverManager     -e[0;39m e[39mdeviceName = motorola Moto G (5) Plus (Android 8.1.0)e[0;39m
2019-04-04 12:14:37.801 e[34mINFO e[0;39m e[36mc.k.k.c.a.driver.AppiumDriverManager     -e[0;39m e[39mdeviceModel = Moto G (5) Pluse[0;39m
2019-04-04 12:14:37.802 e[34mINFO e[0;39m e[36mc.k.k.c.a.driver.AppiumDriverManager     -e[0;39m e[39mdeviceManufacturer = motorolae[0;39m
2019-04-04 12:14:37.809 e[34mINFO e[0;39m e[36mc.k.k.c.a.driver.AppiumDriverManager     -e[0;39m e[39mdeviceOS = Androide[0;39m
2019-04-04 12:14:37.809 e[34mINFO e[0;39m e[36mc.k.k.c.a.driver.AppiumDriverManager     -e[0;39m e[39mdeviceOSVersion = 8.1.0e[0;39m
2019-04-04 12:14:37.823 e[1;31mERRORe[0;39m e[36mc.k.k.core.keyword.internal.KeywordMain  -e[0;39m e[31m❌ Unable to start app at: 'C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk'e[0;39m
2019-04-04 12:14:37.824 e[1;31mERRORe[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor   -e[0;39m e[31m❌ startApplication("C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk", false) FAILED.e[0;39m
e[31mReason:e[0;39m
e[31mcom.kms.katalon.core.exception.StepFailedException: Unable to start app at: 'C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk'e[0;39m
e[31m	at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)e[0;39m
e[31m	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)e[0;39m
e[31m	at App start.run(App start:16)e[0;39m
e[31m	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:331)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)e[0;39m
e[31m	at TempTestCase1554360233457.run(TempTestCase1554360233457.groovy:21)e[0;39m
2019-04-04 12:14:37.824 e[1;31mERRORe[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor   -e[0;39m e[31m❌ Test Cases/APP Install/App start FAILED.e[0;39m
e[31mReason:e[0;39m
e[31mcom.kms.katalon.core.exception.StepFailedException: Unable to start app at: 'C:\Users\ganesh_kunda\Desktop\builds\DellDataGuardian-universal-debug-2.6.1.0.apk'e[0;39m
e[31m	at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)e[0;39m
e[31m	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)e[0;39m
e[31m	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)e[0;39m
e[31m	at App start.run(App start:16)e[0;39m
e[31m	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:331)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)e[0;39m
e[31m	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)e[0;39m
e[31m	at TempTestCase1554360233457.run(TempTestCase1554360233457.groovy:21)e[0;39m
2019-04-04 12:14:37.824 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor   -e[0;39m e[39mEND Test Cases/APP Install/App starte[0;39m
e[35m[HTTP]e[39m e[37m<-- POST /wd/hub/session e[39me[31m500e[39m e[90m34474 ms - 2419e[39m
e[35m[HTTP]e[39m e[90me[39m

I’m doubting whether the appium is not able to identify the app package or what?

In which way this package and activity can give in katalon

I tried Project-Settings-Mobile-Android
also Desiredcapability-custom


#6

Hi @kundaganesh,

Have you also tried running the sample Android test that comes with Katalon Studio? I just want to see if you’re able to run any tests at all, or if it’s an issue with your particular apk file. You can start the Android test project by going to File->New Sample Project->Sample Android Mobile Tests Project.

– Chris


#7

Hi Chris,
I have tried with another sample APK and getting same error unable to start application.

I have tired in both katalon 5.8 and 6.1 versions both are failed to open the app.


#8

Hi @kundaganesh,

A couple more questions:

  • Are you running these tests on an emulator or a real device?
  • If on a real device, have you tried on an emulator? Do you get the same error?
  • Are you able to use the Katalon Record Mobile or Mobile Spy features with the apk you’re trying to test?

– Chris


#9

Hi @Chris_Trevarthen I am also facing same issue as unable to start application which was working earlier…
Using Katalon 6.1.4,Appium 1.8.1. Using Android Emulator.
It just giving message as : 35m[ADB]e[39m Successfully extracted 74 strings from ‘C:\inSight_HEAD\Testing\Mobile\Katalon-InsightMobile\InsightMobile\androidapp\inSight.Mobile.Android.V11-Signed.apk’ resources for ‘(default)’ configuration
After this message nothing happens.
1.I am able to run Sample Android Project
2.I am unable to use Mobile Spy feature with the apk. giving same message as above : resources for ‘(default)’ configuration.

Can you please help me ?


#10

Hi Pooja,
Please give appWaitActivity =* in desired capability it is working for me after this.


#11

@kundaganesh Ok Thanks. Will try with this setting. With Katalon 6.1.4 and Appium Server 1.8.1 its working fine. I am able to start my App


#12

@Pooja1 what is the node.js version you have used with this?