Instrumentation Failure.

Best practices, code snippets for common functionality, examples, and guidelines.
theraviz
Posts: 85
Joined: Sun Apr 14, 2019 9:46 am

Instrumentation Failure.

Post by theraviz » Wed Apr 28, 2021 11:59 am

I have a new mobile app to automate, but when I try to instrument that I am getting the below error.

The developers has confirmed that the apk is Non obfuscated and the API version is 21.
Capture.JPG
Capture.JPG (23.29 KiB) Viewed 45 times
What to do next?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6544
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Instrumentation Failure.

Post by odklizec » Wed Apr 28, 2021 12:26 pm

Hi,

I'm afraid, it's impossible to tell what's wrong without seeing the app. I would suggest to start with instrumentation wizard settings...
Instrumentation.png
Instrumentation.png (29.64 KiB) Viewed 42 times
Enable for example "Debug" option and see, if there is something interesting in instrumentation log. Also, you may try to enable Multidex, Static and Redistribute smali options.

If nothing, helps, you will have to contact Ranorex support. But they may need access to the apk in question. Without analyzing it, there is almost no chance to help with this kind of error.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

theraviz
Posts: 85
Joined: Sun Apr 14, 2019 9:46 am

Re: Instrumentation Failure.

Post by theraviz » Thu Apr 29, 2021 9:26 am

Hello Pavel,

Than you for the reply. I have already contacted the support and waiting reply.

By the way I have tried the advance setting (Different combination) but of no luck. I am getting the below error message.


Error Message :

System.InvalidOperationException: Failed to deploy the application via USB. adb: failed to install C:\Users\sd242\Documents\Ranorex\InstrumentedApk\NBK-IBG-instrumented.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

at Ranorex.Plugin.Mobile.Tools.Android.AndroidUsbDeploymentService.Deploy(String apkFilePath, String deviceInstance, IToolConfig config)
at Ranorex.Plugin.Mobile.RxIntegration.Instrumentation.AndroidWorker.Deploy(String packageName, String toDeploy)
at Ranorex.Plugin.Mobile.RxIntegration.Instrumentation.AndroidWorker.Run()
at Ranorex.Controls.AndroidInstrumentProgressPage.bgw_DoWork(Object sender, DoWorkEventArgs e)

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6544
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Instrumentation Failure.

Post by odklizec » Thu Apr 29, 2021 9:36 am

Hi,

Try to uninstall the existing app from Android device, before instrumenting and installing this new one. Check this post about INSTALL_FAILED_VERSION_DOWNGRADE error...
https://stackoverflow.com/questions/138 ... -downgrade
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

theraviz
Posts: 85
Joined: Sun Apr 14, 2019 9:46 am

Re: Instrumentation Failure.

Post by theraviz » Thu Apr 29, 2021 10:13 am

Thank you :) It helped!