I am getting an error in Appium while running it using selenium and testNG, Appium launch’s app (Wordpress) but wont proceed to the next step.I have pasted the error below , can anyone please help me to debug it.
Appium Error:
nfo: [debug] Error: Activity used to start app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1146:21)
at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Activity used to start app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity)”,“origValue”:“Activity used to start app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity”},“sessionId”:null}
Configuration:
File classpathRoot = new File(System.getProperty(“user.dir”));
File appDir = new File(classpathRoot, “/app”);
File app = new File(appDir, “org.wordpress.android-4.1-APK4Fun.com.apk”);
Thanks for the replay but I am using absolute path, the application is being installed in the emulator through Appium but its not launching the application.
Thanks for the suggestion but I am getting the similar error message for a local app, even though the launch activity is given as in the local app.
One Question?
Is Maven required for appium. I have seen some youtube videos they have used Maven I didn’t used Maven in my framework so I am getting confused with this.
No, Maven is not needed unless you are building your test project maven style [with POM to add dependencies]
The problem you are facing is related to ADB not able to find Activity which we are passing in command line.
If you are not able to launch app using simple ADB command from command line, it means your activity package name is not correct.It is even not related to appium. Its plain adb command.
I would suggest you to install app manually on to device using command -
adb install {application path}
Then install apk info from playstore. Open APK info application and get details of the package name of application. and Package name of Dashboard activity.
I ran the above command from command line, its giving me an error
Starting: Intent { cmp=com.example.
Error type 3
Error: Activity class {com.example.
ashActivity} does not exist.
But I commented the launch activity command from capabilities it ran successfully, still in command prompt I am getting the above mentioned error.I am not getting what would be the reason.
Usually the reason would be, package name of the Launcher activity is not correct.
Do you have access to Android.manifest file of the application? You can get these details from that file.
Also, please note the package name of the application and package name of the Activity can be different. So please double check this.
Hello.
I am getting the same error, but I assume that appActivity name is correct. I am not able to start the app from Appium server.
info: [debug] Error: Activity used to start app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity
at [object Object]. (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1146:21)
at [object Object]. (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Activity used to start app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity)”,“origValue”:“Activity used to start app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity”},“sessionId”:null}