1

I am working with appium inspector on Windows (using a real connnected Android device), and the error that I am getting is:

Failed to create session. An unknown server-side error occurred while processing the command. Original error: The application at '/data/app//base.apk' does not exist or is not accessible

I am thinking that I am getting this error because the path starts with /data which is probably not a root directory of any sort. However, for my mobile phone, I don't know what root directories the data folder would be in.

How do I get the absolute path for the apk?

For reference, here are my capabilities:

{
  "appium:deviceName": "Galaxy A10e",
  "appium:platformVersion": "9",
  "appium:app": "/data/app/<long package name>/base.apk",
  "platformName": "Android",
  "appium:automationName": "UiAutomator2",
  "appium:udid": "RF8MA01FPBE"
} 

Also, in case you are wondering, the appium:appPackage capability also yielded an error when I tried using that. I think that this happened because the package name is more than just 3 things joined by periods (ie. it is not just com.package.name ... It is com.thing1.thing2.thing3....a bunch). With the appPackage capability (instead of just app), the error was like this:

Failed to create session. An unknown server-side error occurred while processing the command. Original error: Cannot start the '' application. Consider checking the driver's troubleshooting documentation. Original error: Error executing adbExec. Original error: 'Command 'C:\Users\\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RF8MA01FPBE shell am start -W -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' exited with code 1'; Command output: Error: Intent does not match any activities: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 }

Rikudou
  • 145
  • 6

1 Answers1

0

You have to always provide the capability for app as , appium:appPackage and appium:appActivity to launch the app and then execute the test scripts.