Android.util.AndroidException: INSTRUMENTATION_FAILED: com.app.mobileapp.selendroid/io.selendroid.Ser verInstrumentation

selendroid/io.selendroid.ServerInstrumentation"
error: android.util.AndroidException: INSTRUMENTATION_FAILED: com.app.mobileapp.selendroid/io.selendroid.Ser
verInstrumentation

    at com.android.commands.am.Am.runInstrument(Am.java:865)

    at com.android.commands.am.Am.onRun(Am.java:282)

    at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)

    at com.android.commands.am.Am.main(Am.java:76)

    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:248)

    at dalvik.system.NativeStart.main(Native Method)

info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: android.util.AndroidException: INSTRUMENTATION_FAILE
D: com.app.mobileapp.selendroid/io.selendroid.ServerInstrumentation

info: [debug] Error: android.util.AndroidException: INSTRUMENTATION_FAILED: com.app.mobileapp.selendroid/io.
selendroid.ServerInstrumentation

at E:\Log\appium\node_modules\appium-adb\lib\adb.js:1401:17
at null.<anonymous> (E:\Log\appium\node_modules\appium-adb\lib\adb.js:172:9)
at ChildProcess.exithandler (child_process.js:646:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be cre
ated. (Original error: android.util.AndroidException: INSTRUMENTATION_FAILED: com.app.mobileapp.selendroid/i
o.selendroid.ServerInstrumentation\r\r)”,“origValue”:“android.util.AndroidException: INSTRUMENTATION_FAILED: c
om.app.mobileapp.selendroid/io.selendroid.ServerInstrumentation\r\r”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 13249.160 ms - 372

uninstall the app along with the Selendroid client and try again.

@Hassan_Radi

It did not help me. I tried to many times but no luck.

Any other solutions ?

may i know the version of appium which you are using?

@Priyank_Shah

Thanks for your reply.

I am using latest appium from git.So today I downloaded fresh appium again by using below command.

git clone https://github.com/appium/appium.git

Then I am resetting it for both android and selendroid.

And starting the server by using below command

node .

actually latest appium uses selendroid 0.11.0, i think which has many problems. can you uninstall selendroid apk from device and check with older version of appium.

The same issue I have been getting from last 3 months. Even I tried with old version of appium.But nothing has happened.

I am testing hybrid app. I red somewhere signing the apk process is different in selendroid. But I could not understand it.

Thanks,
Ramshankar.

May i know which api version that your device have?

I tried with 4.4 ,4.3 and 4.2.

If you device are above API 17 then you should always go for UIAutomator instrumentation. do not go with selendroid capabilities. so check with appium capability.
Also check ur script with Selendroid (not with selendroid + appium). if this problem persist with selendroid then issue with selendroid only.

Thanks,
Priyank Shah

Actually problem is:

In android 4.4.2 I am able to test on only emulator without using selendroid. But unfortunately I am not able to do same with real android device with same version.

That is why I am trying with selendroid to do this same job.

I am not able to get the webview on real android device 4.4.2 , 4.4.4 with Uiautomator. It launches the application but it shows only NATIVE_APP as a context. It does not show the webview.

@ramshankar_testing, selendroid is not solution. it make your problem more complex. and i agree you wont be able to identify WEBVIEW element under uiautomator. but i think you can identify element using chrome inspector.

Thanks,
Priyank Shah

@Priyank_Shah

Identifying an element is not an issue for me.

The issue is why same thing working on emulator but not in real device.

I am able to run the same script on emulator it is able to identify the webview context and working fine.

But same thing I am trying on real android device which does not show the webview.

if you dont mind, then can i check ur app?

@Priyank_Shah,

Sure. It is my pleasure. Please tell me the how can I send you the app ?

Thanks,
Ramshankar.

you can send me apk on: [email protected]

One small doubt,

Is it really require to do setWebContentsDebuggingEnabled=true while testing with real device ?

If yes why not with emulator ?

Thanks,
Ramshankar.

Its old post, but same issue replicate with me, its related with android version and API. It was not working with one of android device, which was 4.4.

hi, did you all solved this problem ? i’m facing the same problem