Unable to start APK on android emulator using Katalon Mobile Recorder or Object Spy


#1

I am not able to start an APK file remotly on the android emulator device.

Steps to reproduce:
1. verify if the APK file is OK and not corrupt -> OK (manual task)
2. start the android emulator device
3. start katalon studio, open project, and then start mobile recorder
4. the started device from 2. is listed and selected
5. select the corresponding apk file
6. klick START on the recorder dialog window
-> katalon connects to the device

and after a short while following error is displayed:

“unable to start application on this device: an unknow server-side error occured while processing the command. Error executing adbExec. … driver info: driver.version.SwipeableAndroidDevice”

Any idea how to fix it?

android.png


#2

Same issue I am also facing,

APK file is getting corrupted and it cant be install any devices, I need to copy from different location to use it, After Spy or recorder, its crashing the apk file.

Still solution is not found please suggested.


#3

Hi @satish1607,

One thing you could try is forcing Appium not to re-sign the apk. You can do this by setting the Desired Capabilities. In your Project->Settings menu, go to Execution->Default->Mobile->Android.

Add a new entry for noSign and set the value to true.

Hope this helps,

Chris


#4

Thanks for the support, I tried using the noSign but still same problem


#5

Hi @satish1607,

That is a weird issue. When you say the apk is corrupted, are you saying that after you try to Record or Spy Mobile, you can’t open the apk any more on your device or simulator, even after quitting Katalon Studio?

– Chris


#6

Thanks for the quick help.

Yes after use of Record or Spy, it was corrupting the apk. As you suggested above to use noSign looks like problem is resolved. Let me test everything then will update on this. When I used noSign as Boolean and False then also it was corrupting not I have changed to Bollean and true now its not corrupting.

Will update you on this after testing.
Thanks again.


#7

Hi @satish1607,

I think I got my true/false mixed up. noSign should be true to prevent signing. Sorry about that.

Here’s a full list of the Appium Desired Capabilities for reference:

http://appium.io/docs/en/writing-running-appium/caps/

– Chris


#8

Just one quick check, in my application when I tap on login button manually I am able to login but when I tap using Katalon studio then its saying server not found and its not logging in. Why katalon is behaving differently.


#9

@satish1607,

Is the app showing an Android error dialog saying “server not found”, or is it a Katalon Studio error saying “server not found”? Can you share a screenshot of that error?

– Chris


#10

Its from the android not from the Katalon, when I close and reopen the application then I am able to login. But when I try to login with Katalon studio then its saying server not found


#11

@satish1607,

That isn’t something I’ve encountered before. Are you able to inspect the network connection of the Android app to see what URLs it’s trying to hit, both when you are running it on its own and through Katalon? I’m wondering if for some reason they are trying to hit different login APIs depending on how the app is run.

You could use a tool like Charles Proxy to check the outgoing traffic.

– Chris


#12

Thanks for the replay, let me do little research then update you. In simple term I am unable to login with katalon script. Is there any other way to launch the application apart from “Start Application” with script?

You can see in picture one when trying with script its showing “Error when login, Please try again”,. Manually I closed and reopen the application then login works correctly.


#13

Hi @satish1607,

That is indeed very weird. Is it possible that you’re using a different username and password for the test versus when you login manually?

If you already have the app installed on your device, you can try to start the application in a different way by faking out the startApplication call with another apk (like the one from the Android Sample Tests).

See here for an example:

– Chris


#14

Hi Chris,
Unfortunately above solution does not worked for me, I am facing the same problem. I am attaching my script and URL to download application (Same Application I am using) from google Play store. Please download it register it and have a look why login is not working.


#15

Hi @satish1607,

Did you get the version of the app that you’re testing from the Google Play store or do you have a development build?

I downloaded the apk and installed it on an emulator, but I receive an error about a rooted device being detected. I’m guessing that this is because the emulator is running as root and perhaps the Play Store version doesn’t allow running on rooted devices.

I made your script a little simpler by cutting out some of the repeated steps. Script.txt (2.2 KB)

– Chris


#16

Thanks a lot for your update, actually both the script (mine and yours) started working. Your script is also doing the same task but in faster manner that’s Great. I will be going to use the script provided by you.

Thanks a lot for your kind and quick help :slight_smile:

Please do let me know how do I identify some object/ buttons which is not able to recognised by SpyMobile like Verify Account, Resend Verification code and Other verification options button


#17

Hi @satish1607,

When you say the objects are not recognized by Spy Mobile, do you mean that the capture screen is blank? This can happen when a developer sets a particular screen in an Android app as “secure”. That means that the screenshots can’t be taken of the screen, and since screenshots are how the Spy Mobile capture shows you what’s on the app, you don’t see anything. This usually happens on login, password, or credit card screens.

While the preview of the screen doesn’t show, you can still capture the objects using the object hierarchy (you just won’t see a preview of the item you’re selecting on the screen).

Hope this helps,

Chris


#18

I mean screen is coming with button and all object but its considering whole screen as one object instead of multiple buttons, edit box etc. This out layer in colour one you can see on screenshot. When I click on verify button its not recognising instead it will high light the whole colour area.


#19

Hi @satish1607,

Sometimes the layout of the app overlays certain views so that clicking on the “Device View” window isn’t very helpful.

If you can navigate the object tree in the “All Objects” section, when you click the object from that list (you might have to use a little guess work to find the right one) you should see the correct element highlighted in the “Device View”.

You can then click the checkbox to the left of the element in the “All Objects” section to prepare the element to be saved.

Hope this helps,

Chris


#20

Thanks Chris I am able to find the objects elements from the above guide.

Thanks Cheers.