output: Exception occurred while executing 'start': java.lang.SecurityException: Permission error when launching Appium Inspector

66 views Asked by At

When i launch the Appium inspector i get the below error


Failed to create session. An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.androidsample.generalstore' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: 'Command 'C:\Users\Prabhani_105760\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n com.androidsample.generalstore/com.androidsample.generalstore.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' exited with code 255'; Command output: Exception occurred while executing 'start': java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.androidsample.generalstore/.MainActivity } from null (pid=11314, uid=2000) not exported from uid 10160 at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1108) at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1013) at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:702) at com.android.server.wm.ActivityTaskManagerService.st

Me Desired Capabilities are configured like below

{ "platformName": "Android", "appium:platformVersion": "11", "appium:deviceName": "Oppo", "appium:udid": "emulator-5554", "appium:appPackage": "com.androidsample.generalstore", "appium:appActivity": "com.androidsample.generalstore.MainActivity", "appium:noReset": true, "appium:ignoreHiddenApp": true, "appium:skipServerInstalation": true, "appium:uiautomator2ServerInstallTimeout": 80000 }

Please note i could launch the app in Andriod Emulator in Appium

Appreciate if you could help me.Thank you

I was trying the launch the appium inspector for the app which i have installed in Appium Studio using the Eclipse code UiAutomator2Options options = new UiAutomator2Options(); options.setDeviceName("PRABPHONE2"); options.setApp("C://Users//Prabhani_105760//eclipse-workspace1//appium//src//test//java//resources//General-Store.apk"); driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), options);

Using above code i could launch the app in Andriod Emulator. But i could not try the same using Appium Inspector

0

There are 0 answers