Unable to launch Native app using Appium

Hi,

I am trying to launch my app using Appium with robot framework. But the code returns the error

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘com.arris.sbc’ application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the ‘com.xxx.xxx’ application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name ‘.com.xxx.xxx.ui.activity.authentication.SplashActivity’ used to start the app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity

I am able to launch other apps in real device.

*** Settings ***
Documentation This script starts SBC app on phone
Library AppiumLibrary
Library Collections

*** Variables ***
${APPIUM_SERVER1} http://127.0.0.1:4723/wd/hub

*** Test cases ***
Test
setup and open SBC app

*** Keywords ***
setup and open SBC app
${androiddriver1}= Open Application ${APPIUM_SERVER1} platformName=android platformVersion=10 deviceName=Nokia 8.1 automationName=uiautomator2
… app=C:/Users/priya.muthusamy/Downloads/myapp.apk appPackage=xxx.xxx.xx newCommandTimeout=7000 appActivity=xxx.xxx.xxx.ui.activity.authentication.SplashActivity remoteAppsCacheLimit=0
Set Suite Variable ${androiddriver1}

Kindly help me

→ try →

appActivity=xxx.xxx.xxx.*

where xxx your appPackage

Hi,

I have set the variable as you suggested but still the same error

setup and open SBC app
${androiddriver1}= Open Application ${APPIUM_SERVER1} platformName=android platformVersion=10 deviceName=Nokia 8.1 automationName=uiautomator2
… app=C:/Users/priya.muthusamy/Downloads/SBC3.4.0Production.apk appPackage=com.arris.sbc newCommandTimeout=7000 appActivity=com.arris.sbc.*
Set Suite Variable ${androiddriver1}

I am launching my app on real device. I am able to launch other apps with same code.

check appium logs in debug mode

Here is the log. I see the same error with no additional info

“isFailover”:false,“isRoaming”:false,“state”:“CONNECTED”,“subtype”:0,“subtypeName”:"",“type”:1,“typeName”:“WIFI”}],“platformVersion”:“10”,“realDisplaySize”:“1080x2246”,“timeZone”:“Asia/Kolkata”}}
[debug] [ADB] Running ‘C:\Users\priya.muthusamy\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s PNXID19012100106 shell dumpsys window’
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.arris.sbc/com.arris.sbc.* and waiting for ‘com.arris.sbc/com.arris.sbc.
[debug] [ADB] Running 'C:\Users\priya.muthusamy\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s PNXID19012100106 shell am start -W -n com.arris.sbc/com.arris.sbc.
-S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[debug] [ADB] We tried to start an activity that doesn’t exist, retrying with ‘.com.arris.sbc.’ activity name
[debug] [ADB] Running 'C:\Users\priya.muthusamy\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s PNXID19012100106 shell am start -W -n com.arris.sbc/.com.arris.sbc.
-S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched ‘/’ to command name ‘deleteSession’
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/755a2b00-cf95-456e-8f82-a5a3f12533ec] with no body
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“755a2b00-cf95-456e-8f82-a5a3f12533ec”,“value”:null}
[debug] [ADB] Running ‘C:\Users\priya.muthusamy\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s PNXID19012100106 shell am force-stop com.arris.sbc’
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running ‘C:\Users\priya.muthusamy\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s PNXID19012100106 forward --remove tcp:8200’
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running ‘C:\Users\priya.muthusamy\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s PNXID19012100106 shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1606905029300 (16:00:29 GMT+0530 (India Standard Time))
[debug] [W3C] Encountered internal error running command: Error: Cannot start the ‘com.arris.sbc’ application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the ‘com.arris.sbc’ application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name ‘.com.arris.sbc.*’ used to start the app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity
[debug] [W3C] at ADB.startApp (C:\Users\priya.muthusamy\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:177:11)
[debug] [W3C] at AndroidUiautomator2Driver.ensureAppStarts (C:\Users\priya.muthusamy\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:546:7)
[debug] [W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\priya.muthusamy\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:422:7)
[debug] [W3C] at AndroidUiautomator2Driver.createSession (C:\Users\priya.muthusamy\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:224:7)
[debug] [W3C] at AppiumDriver.createSession (C:\Users\priya.muthusamy\AppData\Roaming\npm\node_modules\appium\lib\appium.js:356:35)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 11557 ms - 1633
[HTTP]