2025-07-09 10:23:09.558 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/TC_Auth/Login_ValidCredentials
2025-07-09 10:23:10.238 DEBUG testcase.Login_ValidCredentials - 1: startExistingApplication("com.pactindo.emoney", STOP_ON_FAILURE)
2025-07-09 10:23:10.591 ERROR c.k.k.core.keyword.internal.KeywordMain - ❌ Unable to start app with application ID: 'com.pactindo.emoney' (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to start app with application ID: 'com.pactindo.emoney'
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:65)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:34)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.mobile.keyword.builtin.StartExistingApplicationKeyword.startApplication(StartExistingApplicationKeyword.groovy:53)
at com.kms.katalon.core.mobile.keyword.builtin.StartExistingApplicationKeyword.execute(StartExistingApplicationKeyword.groovy:38)
Here’s my file .yml:
stages:
- test
test_katalon_mobile:
stage: test
tags:
- runner_for_mobile
script:
- adb devices
- |
& "C:\Program Files\Katalon_Studio_Engine_Windows_64-10.2.3\katalonc.exe" -noSplash -runMode=console -projectPath="C:\Users\User\Katalon Studio\paccash\Android Mobile Tests with Katalon Studio.prj" -retry=0 -testSuitePath="Test Suites/Auth/Login" -browserType="Android" -deviceId="9ff68ebd" -executionProfile="default" -apiKey="MyAPIKey" --config -proxy.auth.option=NO_PROXY -proxy.system.option=NO_PROXY -proxy.system.applyToDesiredCapabilities=true -appiumDirectory="C:\Users\User\AppData\Roaming\npm\node_modules\appium"
1 Like
hi @ranggahendarmin007
just want to make sure about the gitlab pipeline, is it installed locally on your own machine?
1 Like
Unable to start app with application ID: 'com.pactindo.emoney' in GitLab CI pipeline typically indicates one of these issues:
Common Causes & Solutions
- App Not Installed on Device
Verify the app is installed on your Android device/emulator:
bash
adb -s 9ff68ebd shell pm list packages | grep "com.pactindo.emoney"
2.Fix*: Install the app before running tests:
text
script:
- adb -s 9ff68ebd install path/to/app.apk # Add this line
- adb devices
- katalonc.exe command...
- Device Not Recognized
Confirm your device is connected and authorized:
text
script:
- adb devices # Should list "9ff68ebd" as device
- adb -s 9ff68ebd shell getprop ro.build.version.release # Verify communication
- Incorrect Appium Setup
The Appium path C:\Users\User\AppData\... is user-specific and likely invalid in CI.
5.Fix*: Use global Appium path or install Appium globally:
text
- appiumDirectory="C:\Program Files\Appium" # Common global path
# OR
- npm install -g appium
- appiumDirectory="C:\Path\To\Global\Node\Modules"
- Device Locked/Unresponsive
Add device wake-up commands:
text
script:
- adb -s 9ff68ebd shell input keyevent KEYCODE_WAKEUP
- adb -s 9ff68ebd shell input swipe 500 1000 500 100 # Unlock swipe
Modified .gitlab-ci.yml
text
test_katalon_mobile:
stage: test
tags:
- runner_for_mobile
script:
# Verify device connection
- adb devices
- adb -s 9ff68ebd shell getprop ro.product.model
# Wake and unlock device
- adb -s 9ff68ebd shell input keyevent KEYCODE_WAKEUP
- adb -s 9ff68ebd shell input swipe 500 1000 500 100
# Install app if missing
- adb -s 9ff68ebd shell pm list packages | grep "com.pactindo.emoney" || adb -s 9ff68ebd install app.apk
# Run Katalon with corrected Appium path
- & "C:\Program Files\Katalon_Studio_Engine_Windows_64-10.2.3\katalonc.exe"
-noSplash
-runMode=console
-projectPath="C:\Users\User\Katalon Studio\paccash\Android Mobile Tests with Katalon Studio.prj"
-retry=0
-testSuitePath="Test Suites/Auth/Login"
-browserType="Android"
-deviceId="9ff68ebd"
-executionProfile="default"
-apiKey="MyAPIKey"
--config
-proxy.auth.option=NO_PROXY
-proxy.system.option=NO_PROXY
-proxy.system.applyToDesiredCapabilities=true
-appiumDirectory="C:\Program Files\Appium" # Updated path
Additional Troubleshooting Steps
- Check Appium Logs:
Add Appium server startup to your script:
text
- appium & # Start Appium server
- appiumDirectory="C:\Path\To\Appium"
- Grant Permissions:
Add permissions reset before launch:
bash
adb -s 9ff68ebd shell pm reset-permissions
- Clear App Data:
Reset app state before execution:
bash
adb -s 9ff68ebd shell pm clear com.pactindo.emoney
- Adb Reconnect:
Force reconnect device:
bash
adb reconnect
Note: For Windows runners, ensure:
- Android SDK paths are set in system environment variables
- Device drivers are installed
- Katalon Engine version matches your Studio version