'Unable to start application on this device' error. packageAndLaunchActivityFromManifest failed.

Hello,

I’m new to Katalon Studio and trying to set it up for my mobile testing, but keep running into following error when launching Mobile Recorder or Mobile Object Spy with my .apk:

'Unable to start application on this device: : An unknown server-side error occured while processing the command. Original error:
packageAndLaunchActivityFromManifestFailed. Original error: Command ‘/…/aapt dump badging /…/testApp.apk’ exited with code 1 (WARNING: The server did not provide any stacktrace information)

…’

I am running:
macOS X 10.13.5

Katalon Studio, Version: 5.4.2, Build: 1
Appium Version 1.6.2 (1.6.2)

I am also attaching the ‘apium.log’

I followed ‘Installation and Setup’, ‘Troubleshooting’ as well as searching the web for similar issue, but with no luck.

Is the build perhaps required to be created in some specific manner (e.g. build from normal launch procedure) or is a fully generated build with signing etc. required?

Any help or ideas are much appreciated!

LaunchError.png

appium.log

Even am facing the same issue on Mac OS

Jan Havelka said:

Hello,

I’m new to Katalon Studio and trying to set it up for my mobile testing, but keep running into following error when launching Mobile Recorder or Mobile Object Spy with my .apk:

'Unable to start application on this device: : An unknown server-side error occured while processing the command. Original error:
packageAndLaunchActivityFromManifestFailed. Original error: Command ‘/…/aapt dump badging /…/testApp.apk’ exited with code 1 (WARNING: The server did not provide any stacktrace information)

…’

I am running:
macOS X 10.13.5

Katalon Studio, Version: 5.4.2, Build: 1
Appium Version 1.6.2 (1.6.2)

I am also attaching the ‘apium.log’

I followed ‘Installation and Setup’, ‘Troubleshooting’ as well as searching the web for similar issue, but with no luck.

Is the build perhaps required to be created in some specific manner (e.g. build from normal launch procedure) or is a fully generated build with signing etc. required?

Any help or ideas are much appreciated!

Check you app package and activity name …appears its incorrect and due to this your are facing this issue…

Pooja said:

Jan Havelka said:

Hello,

I’m new to Katalon Studio and trying to set it up for my mobile testing, but keep running into following error when launching Mobile Recorder or Mobile Object Spy with my .apk:

'Unable to start application on this device: : An unknown server-side error occured while processing the command. Original error:
packageAndLaunchActivityFromManifestFailed. Original error: Command ‘/…/aapt dump badging /…/testApp.apk’ exited with code 1 (WARNING: The server did not provide any stacktrace information)

…’

I am running:
macOS X 10.13.5

Katalon Studio, Version: 5.4.2, Build: 1
Appium Version 1.6.2 (1.6.2)

I am also attaching the ‘apium.log’

I followed ‘Installation and Setup’, ‘Troubleshooting’ as well as searching the web for similar issue, but with no luck.

Is the build perhaps required to be created in some specific manner (e.g. build from normal launch procedure) or is a fully generated build with signing etc. required?

Any help or ideas are much appreciated!

Check you app package and activity name …appears its incorrect and due to this your are facing this issue…

Could you please elaborate where do we see this ? Is this in Appium Server you are talking about for the app package and the Activity name.

Hi Rocky,

There might be a mismatch between the package name and the activity name in your settings.

There are some DesiredCapabilities you can set that might help you get around this. In your Project->Settings menu, go to Execution->Default->Mobile->Android.

Add new entries for appPackage, appActivity, appWaitActivity, and appWaitDuration. Here’s a description of what those activities mean: http://appium.io/docs/en/writing-running-appium/caps/

When done, it should look something like this (substituting mycompany for the actual company code in the package).

Name              Type   Value
appWaitActivity   String   com.mycompany.*
appPackage        String   com.mycompany.app
appActivity       String   com.mycompany.Login
appWaitDuration   Number   30000

Hope this helps,

Chris

2 Likes

I am also facing the same issue on MacBook with iPhone.

Even after adding desired capabilities

Hi @satish1607,

Sorry for the confusion, but the desired capabilities listed above post are aimed more at Android apps instead of iOS apps.

If you’re having trouble launching an iOS app, can you please confirm the version of Xcode, Appium, and Katalon Studio you’re using? Currently, I’ve been successful with Xcode 10, Appium 1.12.1 and Katalon Studio 6.2.1.

Hope this helps,

Chris

Hi Chris,

Thanks for your replay, please find the version details below

Katalon Studio 6.1.4 build 1
Appium 1.8.2 beta
Xcode Version 10.2.1 (10E1001)
iPhone version 12.3.1

with above setup, I am able to build the WebDriverAgentRunner successfully and it can be installed on iOS real mobile. When I upgraded to latest Katalon Studio 6.2 build found that my iOS device is not able to recognised by Katalon Recorder or Spy mobile so downgraded the Katalon Studio to 6.1.4. Now I am facing my application is not installing from Katalon Studio and getting the error 253.

Please help me.

regards
Satish Kumar Pal

Hi @satish1607,

You can check out this post which has some details on how to make sure that Katalon can see your devices. New installs of Xcode can change things with the simulators, so it might be a good idea to run through these (specifically starting at Install ios-deploy)

They may also help you if you want to try to upgrade to Katalon Studio 6.2.1 and Appium 1.12.1 again.

Hope this helps,

Chris

Not yet resolved for me, could you please let me know how to delete Appium 1.12.1 from mac so that I can install 1.8.2 beta to check if my iPhone detects by Katalon studio.

Older version of Katalon +Appium 1.8.2 beta, iPhone is detecting by katalon.

Hi @satish1607,

You can downgrade Appium by using npm install -g appium@1.8.2-beta.

You could also remove the existing copy with npm uninstall -g appium and then reinstall it fresh using the command above.

In either case, you might need to rebuild the WebDriverAgent project within Appium.

Hope this helps,

Chris

Thanks Chris finally my device is detecting in Katalon Studio, after all the struggling by following below methods its started showing,
brew update

brew uninstall --ignore-dependencies libimobiledevice

brew uninstall --ignore-dependencies usbmuxd

brew install --HEAD usbmuxd

brew unlink usbmuxd

brew link usbmuxd

brew install --HEAD libimobiledevice

1 Like

Still facing the same issue( unable to launch application erroce code 65) today I have upgraded to latest version of Katalon which having option to run application from Application ID.

Still not able to launch any installed application tried with calculator or calendar.

Finally I resolved my iOS issue by following below steps:

Katalon v 6.3.2 build 4
Appium v 1.14 2

it covers Unable to open application with multiple reason like error code 65, 253, etc

I was getting error when I excutedd below command on Mac terminal

iOS-deploy —id xxxxxxxxxxxxxxxxx —bundle .ipa/.app file path (xx means device id)

Error I got “a valid provisional profile not found” in console

To resolve profile issue I followed below steps:

I have asked my developer to add my real devices UIID in there list ( I am not sure, some .plist file will be there and developer need to add the real devices UIID. After adding they generated the build for me, then onlyI was able to install .ipa/.app file into real devices otherwise it is not going to work.)

Now I installed latest version of Katalon Studio by following steps present on below URL :

@ Install WebDriver agent either click on link present on website or follow the below URL

While following the steps you might get issue with Appium, When you found that ./Scripts/bootstrap.sh file not found in ur system or not able to execute the commands

You need to resolve this issue by following below steps

Actual location is

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Scripts

Some version of Appium having different location you need to search and find the correct location

Open terminal

Execute the below command

$find. -name bootstrap.sh

It will display where bootstrap.sh file is located

Type PWD to get the path and change the directory to above path, most probably it will be /Users/Username/Library

Change the directory and execute the below commands

Then follow the remaining steps

Like WebDriverAgent.xcodeproj

Once it open in Xcode your build process may fail due to build identifier name to avoid that change the build identifier name to some thing else like

Com.facebook.WebDriverAgentRunner to com.fb.WebDriverAgent it should be unique

**Then go to product->build **
same you need to repeat for

WebDriverAgentLib

WebDriverAgentRunner

Once succeeded select IntegrationApp in left hand side then go to Product->Run in Xcode and make sure ur real device is selected so that it will install the IntegrationApp in ur connected real device, once installed don’t remove it

Or

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=<udid>’ test

where UDID is your Device ID

Your WebDriverRunner agent process is success

if in future you are getting unable to install application with error code 65 or 253 please install the IntegrationApp from Xcode to real device, then run ur test.

Now Open the Katalon Studio

Create/Open any Project

Go to Project->Settings->Desired Capabilities

And add the following

platformVersion 12.1

deviceName iPhone6s

bundleId com.hubble.btappphase1

udid xxxxxxxxxxxxxxxxxx

useNewWDA true

AutomationName XCUITest

Select all type = String except useNewWDA, for this it need to be selected as Boolean

Now Click on Spy Mobile or Record Mobile and select iOS from dropdown

Select Device name as ur real device

Start with Application File

Provide the path of ur .ipa/.app file in Application File

Click on Start

It should launch ur application without any issue

If ur connected device is not listing or recognised by Katalon Studio Please flood the below steps

brew uninstall --ignore-dependencies libimobiledevice

brew uninstall --ignore-dependencies usbmuxd

brew install --HEAD usbmuxd

brew unlink usbmuxd

brew link usbmuxd

brew install --HEAD libimobiledevice

2 Likes