-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.RuntimeException: androidx.test.services.shellexecutor.ClientNotConnected #324
Comments
We are also getting this every now and then. Any luck @tir38 ? |
@athkalia nope. Sadly we just removed the API 23/24 devices from our list of test emulators =( |
@athkalia this started happening on all of our test emulators (including API28). I think what was happening was that we were hitting the default 15 min timeout for Firebase Test Lab. Depending on how you trigger your tests you may need to increase the timeout https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run#--timeout When we bumped to 30 mins, everything was fine. |
I think for us it's already 30mins |
I believe the maximum value is 60 minutes. So maybe you can try bumping it to 35 minutes and see if that helps. The give away for me was when I actually went and looked at the firebase console. I saw this banner that said your test has timed out or expired. I didn't see any actual indication in the logs though. |
We are also facing this issue, changing timeout doesn't really help us. |
hey @athkalia , did you ever figure out how to fix the issue? |
Same problem here, even with a 1 hour timeout, I'm getting |
Nope, sorry :/ |
Do we have an update about this? It started a few days ago and it's happening with different devices with different API levels on Firebase Test Lab.
Any kind of help, please? |
@hamen It seems Firebase introduced a bug to TestLab when they updated their dependencies. The bug was introduced in firebase-iid and firebase-messaging dependencies. If you are using either of these dependencies, you must update them to 20.2.3 or later. Messaging is already at 20.2.4 |
Similar issue. Updating dependencies did not help.
|
@borwoj Android Studio will usually warn you if there is a dependency that can be updated, but I've seen it fail for Firebase dependencies sometimes. You should look up the latest dependency version numbers and compare against the ones in your project, just to be safe. |
I was hitting the same issue when porting instrumentation tests from module to another. Groovy gradle syntax: testInstrumentationRunnerArguments clearPackageData: 'true' Kotlin gradle syntax: testInstrumentationRunnerArguments = mapOf(
"clearPackageData" to "true"
) Refs https://developer.android.com/training/testing/junit-runner#ato-gradle |
We also have this issue but we always had clearPackageData enabled like mentioned by @tobrun I'm not sure if that's the cause. Is there anything we can do to help proceed investigation of this issue? |
We experience the same issue :/ Did anyone find a way to fix it? |
If you look in your system logcat, I expect that you will find that What's happening there is that the code run as an Instrumentation is publishing a service handle to the SpeakEasy service running in |
Our project on Firebase Test Lab are running into this intermittently too (ARM emulator). Frustrating as it ultimately is a timeout with no other information. We're using latest stable (02/2023):
02-02 13:18:32.208: E/AndroidRuntime(7612): FATAL EXCEPTION: AndroidTestOrchestrator
02-02 13:18:32.208: E/AndroidRuntime(7612): Process: androidx.test.orchestrator, PID: 7612
02-02 13:18:32.208: E/AndroidRuntime(7612): java.lang.RuntimeException: androidx.test.services.shellexecutor.ClientNotConnected
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.services.shellexecutor.ShellExecutorImpl.executeShellCommandSync(ShellExecutorImpl.java:8)
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.services.shellexecutor.ShellExecutorImpl.executeShellCommandSync(ShellExecutorImpl.java:1)
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.orchestrator.AndroidTestOrchestrator.execShellCommandSync(AndroidTestOrchestrator.java:3)
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.orchestrator.AndroidTestOrchestrator.-$$Nest$smexecShellCommandSync(Unknown Source:0)
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.orchestrator.AndroidTestOrchestrator$2.run(AndroidTestOrchestrator.java:1)
02-02 13:18:32.208: E/AndroidRuntime(7612): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
02-02 13:18:32.208: E/AndroidRuntime(7612): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
02-02 13:18:32.208: E/AndroidRuntime(7612): at java.lang.Thread.run(Thread.java:923)
02-02 13:18:32.208: E/AndroidRuntime(7612): Caused by: androidx.test.services.shellexecutor.ClientNotConnected
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.services.shellexecutor.ShellCommandClient.execOnServer(ShellCommandClient.java:19)
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.services.shellexecutor.ShellCommandClient.execOnServerSync(ShellCommandClient.java:2)
02-02 13:18:32.208: E/AndroidRuntime(7612): at androidx.test.services.shellexecutor.ShellExecutorImpl.executeShellCommandSync(ShellExecutorImpl.java:2) and then the orchestrator dies 02-02 13:18:32.218: I/ActivityManager(556): Process androidx.test.orchestrator (pid 7612) has died: fg BTOP
02-02 13:18:32.218: I/Zygote(301): Process 7612 exited due to signal 9 (Killed)
02-02 13:18:32.218: I/libprocessgroup(556): Successfully killed process cgroup uid 10170 pid 7612 in 0ms
02-02 13:18:32.218: W/ActivityManager(556): Scheduling restart of crashed service androidx.test.orchestrator/.OrchestratorService in 1000ms for connection
02-02 13:18:32.219: W/ActivityManager(556): Crash of app androidx.test.orchestrator running instrumentation ComponentInfo{androidx.test.orchestrator/androidx.test.orchestrator.AndroidTestOrchestrator}
02-02 13:18:32.222: I/ActivityManager(556): Force stopping androidx.test.orchestrator appid=10170 user=0: finished inst
02-02 13:18:32.222: I/ActivityManager(556): Force stopping service ServiceRecord{26b4b99 u0 androidx.test.orchestrator/.OrchestratorService} I don't particularly see anything about |
Update gradle, build tools, androidx and guava versions to latest stable versions.
Are they any new Information on this bug? We have the same behaviour on our testexecution for 2-3 month now |
One thing to watch out for is installing applications after |
Any update on this ? Other runs on API 27/28/29/30 are stable. |
Are your tests installing an APK after the test starts? dex2oat can take up huge amounts of memory, which can lead to killing |
@mithriltabby could you clarify the logic behind this snippet? Is it supposed to swallow the exceptions when executing shell commands to avoid tests marked as failed? Lines 523 to 535 in 7a0feb6
If I'm not missing anything, it's not gonna work, because here these exceptions are wrapped into a android-test/services/shellexecutor/java/androidx/test/services/shellexecutor/ShellExecutorImpl.java Lines 65 to 72 in 7a0feb6
|
That's one of those things that needs refactoring, but there are clients depending on the existing behavior, so doing so is going to be a lot of work and we haven't had time to do it yet. |
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:
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
Link to a public git repo demonstrating the problem:
none
The text was updated successfully, but these errors were encountered: