# Error: The instrumentation process cannot be initialized. Make sure the application under test is doesnot crash.Investigate logcat output

**URL:** <https://discuss.appium.io/t/error-the-instrumentation-process-cannot-be-initialized-make-sure-the-application-under-test-is-doesnot-crash-investigate-logcat-output/38315>\
**Category:** Issues/Bugs\
**Created:** [January 18, 2023, 9:57am UTC](https://discuss.appium.io/t/error-the-instrumentation-process-cannot-be-initialized-make-sure-the-application-under-test-is-doesnot-crash-investigate-logcat-output/38315 "2023-01-18T09:57:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishala\_Nagaraj](https://discuss.appium.io/user_avatar/discuss.appium.io/vishala_nagaraj/32/9546_2.png) [@Vishala\_Nagaraj](https://discuss.appium.io/u/Vishala_Nagaraj)\
**Post date:** [January 18, 2023, 9:57am UTC](https://discuss.appium.io/t/error-the-instrumentation-process-cannot-be-initialized-make-sure-the-application-under-test-is-doesnot-crash-investigate-logcat-output/38315/1 "2023-01-18T09:57:31Z")

</div>

What does the above error mean? Started getting it all of a sudden and unable to launch appium session.

Any help greatly appreciated as this is blocking our project ☹

---

<div class="post-metadata">

**Author:** ![wreed](https://discuss.appium.io/letter_avatar_proxy/v4/letter/w/919ad9/32.png) [@wreed](https://discuss.appium.io/u/wreed)\
**Post date:** [January 18, 2023, 4:51pm UTC](https://discuss.appium.io/t/error-the-instrumentation-process-cannot-be-initialized-make-sure-the-application-under-test-is-doesnot-crash-investigate-logcat-output/38315/2 "2023-01-18T16:51:38Z")

</div>

Sometimes it means there is a pop up on the screen that is blocking Appium. Hard to say without a log, which you could share as a git gist:

[https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists](https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists)

---

<div class="post-metadata">

**Author:** ![Vishala\_Nagaraj](https://discuss.appium.io/user_avatar/discuss.appium.io/vishala_nagaraj/32/9546_2.png) [@Vishala\_Nagaraj](https://discuss.appium.io/u/Vishala_Nagaraj)\
**Post date:** [January 19, 2023, 6:45am UTC](https://discuss.appium.io/t/error-the-instrumentation-process-cannot-be-initialized-make-sure-the-application-under-test-is-doesnot-crash-investigate-logcat-output/38315/3 "2023-01-19T06:45:11Z")

</div>

My github account has some authentication issue.Please find the logs in below link:

[https://drive.google.com/file/d/10vvLxWOzEmF9XCD8MNyt5wDiIcSbMTi\_/view?usp=sharing](https://drive.google.com/file/d/10vvLxWOzEmF9XCD8MNyt5wDiIcSbMTi_/view?usp=sharing)

appium.txt is server logs and instrumentation.txt is logcat logs

I researched on net and none of solutions worked.

Tried uninstalling uiautomator2 apks and it did not work.

Switching to uiautomator1 worked.But i do not want to go for it as it is not right approach as uiautomator1 is deprecated.

Please help.Thanks in advance for you time !

---

<div class="post-metadata">

**Author:** ![wreed](https://discuss.appium.io/letter_avatar_proxy/v4/letter/w/919ad9/32.png) [@wreed](https://discuss.appium.io/u/wreed)\
**Post date:** [January 19, 2023, 5:18pm UTC](https://discuss.appium.io/t/error-the-instrumentation-process-cannot-be-initialized-make-sure-the-application-under-test-is-doesnot-crash-investigate-logcat-output/38315/4 "2023-01-19T17:18:51Z")

</div>

This is the error I’m seeing:

> java.lang.IllegalStateException: UiAutomationService android.accessibilityservice.IAccessibilityServiceClient$Stub$Proxy@59896baalready registered!

I found a document on killing the service that is already registered here:

[https://debugah.com/app-automated-execution-error-uiautomationservice-android-accessibilityservice-iaccessibilityserviceclientstubproxy63c31ebalready-registered-20050/](https://debugah.com/app-automated-execution-error-uiautomationservice-android-accessibilityservice-iaccessibilityserviceclientstubproxy63c31ebalready-registered-20050/)

One thing that seems peculiar about your setup is that there appear to be 5 devices connected to the computer:

> [debug] [ADB] Connected devices: [{“udid”:“R3CM603JHVW”,“state”:“device”},{“udid”:“R3CN30YD8FP”,“state”:“device”},{“udid”:“R3CNB0FPA4N”,“state”:“device”},{“udid”:“R3CNC0EZPVH”,“state”:“device”},{“udid”:“R3CR315S5TV”,“state”:“device”}]

If you only connect one device does this problem go away? This seems like info you should have shared…

Finally, there is a bug filed:

> <https://github.com/appium/appium/issues/16380>
>
> \## The problem
> can not create session because android.accessibilityservice.IAcc…essibilityServiceClient already registered
> 
> \## Environment
> 
> \* Appium version (or git revision) that exhibits the issue: v1.22.2
> \* Last Appium version that did not exhibit the issue (if applicable): is v1.x latest version 
> \* Desktop OS/version used to run Appium: OSX 10.15
> \* Node.js version (unless using Appium.app|exe): v12.18.3
> \* Npm or Yarn package manager: npm
> \* Mobile platform/version under test: Android emulator 9
> \* Real device or emulator/simulator: emulator
> \* Appium CLI or Appium.app|exe: CLI
> 
> \## Details
> 
> each test case use a new create appium server, and use udid bind android emulator(not reboot), we will delete session and release server every case. 
> But after running 8-10 test case， this problem will happens and since then the test case on this emulator will all failed with this issue.
> 
> Whether the service was not deleted in the previous case? 
> 
> \## Link to Appium logs
> 
> 1. create session error log here: https://gist.github.com/youngfreeFJS/c5c8f04da7561570b95479d60ac67ccf
> 2. the previous one of this error case log (use same emualor ): https://gist.github.com/youngfreeFJS/c3700ecedceb54f25f8fb11f883e689c
> 
> 
> 
> \## Code To Reproduce Issue \[Good To Have \]
> 
> Please remember that with sample code it's easier to reproduce the bug and it's much faster to fix it.
> 
> Please git clone https://github.com/appium/appium and from the \`sample-code\` directory, use one of your favourite languages and sample apps to reproduce the issue.
> 
> In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
