android / android/android-test
java.lang.RuntimeException: androidx.test.services.shellexecutor.ClientNotConnected
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
Instrumentation test randomly failing. When running espresso tests on our CI machine (which runs tests on Firebase Test Lab) we occasionally get the following crash and then the tests stop:
```
FATAL EXCEPTION: AndroidTestOrchestrator
Process: androidx.test.orchestrator, PID: 8463
java.lang.RuntimeException: androidx.test.services.shellexecutor.ClientNotConnected
at androidx.test.services.shellexecutor.ShellExecutorImpl.executeShellCommandSync(ShellExecutorImpl.java:60)
at androidx.test.orchestrator.AndroidTestOrchestrator.execShellCommandSync(AndroidTestOrchestrator.java:532)
at androidx.test.orchestrator.AndroidTestOrchestrator.access$700(AndroidTestOrchestrator.java:127)
at androidx.test.orchestrator.AndroidTestOrchestrator$2.run(AndroidTestOrchestrator.java:360)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: androidx.test.services.shellexecutor.ClientNotConnected
at androidx.test.services.shellexecutor.ShellCommandClient.execOnServer(ShellCommandClient.java:97)
at androidx.test.services.shellexecutor.ShellCommandClient.execOnServerSync(ShellCommandClient.java:135)
at androidx.test.services.shellexecutor.ShellExecutorImpl.executeShellCommandSync(ShellExecutorImpl.java:56)
... 6 more
```
It's never the same test causing the problem. Not sure it matters but it's only when testing on Nexus5X emulator for API versions 23 / 24. Tests on other emulators / API versions all pass fine.
### Steps to Reproduce
none
### Expected Results
Tests should continue and complete
### Actual Results
Crash.
### AndroidX Test and Android OS Versions
junitVersion = '4.12'
androidXJunitVersion = '1.1.1-alpha01'
androidXTestRunnerVersion = '1.1.2-alpha01'
androidXTestRulesVersion = '1.1.2-alpha01'
androidXTestOrchestratorVersion = '1.1.2-alpha01'
espressoCoreVersion = '3.1.2-alpha01'
espressoContribVersion = '3.1.2-alpha01'
espressoIdlingVersion = '3.1.2-alpha01'
### Link to a public git repo demonstrating the problem:
none
Contributor guide
Research direction
Start with the AndroidTestOrchestrator.execShellCommandSync and ShellCommandClient.execOnServerSync stack-trace entries, then compare Firebase Test Lab runs on Nexus 5X emulators using API 23 and 24. Reproduce the intermittent failure if possible and determine whether those runs complete without ClientNotConnected; the issue provides no reproducible steps or named test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, firebase, java
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100