android / android/android-test
Test with orchestrator never run due to androidx_test_services.speak_easy returns null!
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
Android Test orchestrator not working. Only got fatal exception on logcat:
```log
--------- beginning of crash
2022-08-31 09:49:21.213 20074-20074/? E/AndroidRuntime: FATAL EXCEPTION: main
PID: 20074
java.lang.IllegalStateException: Call to getContentProviderExternal for: androidx_test_services.speak_easy returns null!
at androidx.test.services.speakeasy.client.ToolConnection$ToolConnectionPostIcs.doCall(ToolConnection.java:25)
at androidx.test.services.speakeasy.client.ToolConnection.publish(ToolConnection.java:6)
at androidx.test.services.speakeasy.client.ToolConnection.publish(ToolConnection.java:1)
at androidx.test.services.shellexecutor.BlockingPublish.getResult(BlockingPublish.java:2)
at androidx.test.services.shellexecutor.ShellCommandExecutorServer.start(ShellCommandExecutorServer.java:6)
at androidx.test.services.shellexecutor.ShellMain.main(ShellMain.java:2)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:378)
2022-08-31 09:49:21.214 20074-20074/? E/AndroidRuntime: Error reporting crash
java.lang.RuntimeException: Bad file descriptor
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:635)
at android.app.IActivityManager$Stub$Proxy.handleApplicationCrash(IActivityManager.java:6290)
at com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException(RuntimeInit.java:176)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1073)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
at java.lang.Thread.dispatchUncaughtException(Thread.java:2200)
```
### Steps to Reproduce
Turn on test orchestrator on `build.gradle`, and run the test.
### Expected Results
The test run.
### Actual Results
Nothing happened but got fatal logs.

### AndroidX Test and Android OS Versions
#### Android Studio
```
Android Studio Chipmunk | 2021.2.1 Patch 2
Build #AI-212.5712.43.2112.8815526, built on July 10, 2022
Runtime version: 11.0.12+7-b1504.27 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.4
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Registry: external.system.auto.import.disabled=true, ide.balloon.shadow.size=0
Non-Bundled Plugins: com.intellij.javafx (1.0.4), Quick Notes (3.3), com.tabnine.TabNine (0.7.21), some.awesome (1.14), indent-rainbow.indent-rainbow (1.7.0), Dart (212.5744), Gradle View (4.0.0), com.github.mikesafonov.jenkins-linter-idea-plugin (0.6.0), net.seesharpsoft.intellij.plugins.file-preview (1.6.4), com.intellij.marketplace (212.5712.51), IdeaVIM (1.9.2), IdeaVimExtension (1.5.0), Key Promoter X (2021.3), mobi.hsz.idea.gitignore (4.3.0), Shifter (1.9.6), cn.haojiyou.CodeGlance3 (2.1.1-2021.1.3), idea.plugin.protoeditor (212.5080.8), com.cmgapps.intellij.proguard-retrace-unscambler (1.5.0), org.intellij.plugins.markdown (212.5457.16), com.github.beansoftapp.visualgc.plugin (2022.1.0), String Manipulation (9.5.0), tanvd.grazi (212.5712.15), PlantUML integration (5.17.0), org.jetbrains.kotlin (212-1.7.10-release-333-AS5457.46), org.jetbrains.compose.desktop.ide (1.1.1), izhangzhihao.rainbow.brackets (6.25), com.github.grishberg.android.android-layout-inspector-plugin (22.07.25.0), com.chrisrm.idea.MaterialThemeUI (6.9.1), zielu.gittoolbox (212.9.9), com.developerphil.adbidea (1.6.6), com.josesamuel.logviewer (3.3), com.github.grishberg.android.yamp (22.08.10.0), de.endrullis.idea.postfixtemplates (2.12.1.212), org.norbye.tor.kdocformatter (1.5.6), com.squareup.sqldelight (1.5.3), cn.yiiguxing.plugin.translate (3.3.4+203u212), com.jetbrains.kmm (0.3.3(212-1.7.0-RC-release-217-IJ)-104), io.flutter (69.0.2)
```
#### Dependencies
```kotlin
// To use the androidx.test.core APIs
androidTestImplementation("androidx.test:core:1.4.0")
// Kotlin extensions for androidx.test.core
androidTestImplementation("androidx.test:core-ktx:1.4.0")
// To use the androidx.test.espresso
// androidTestImplementation("androidx.test:espresso:espresso-core:3.4.0")
// To use the JUnit Extension APIs
androidTestImplementation("androidx.test.ext:junit:1.1.3")
// Kotlin extensions for androidx.test.ext.junit
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.3")
// To use the Truth Extension APIs
androidTestImplementation("androidx.test.ext:truth:1.4.0")
// To use the androidx.test.runner APIs
androidTestImplementation("androidx.test:runner:1.4.0")
// To use android test orchestrator
androidTestUtil("androidx.test:orchestrator:1.4.1")
```
#### Device
Model name: Galaxy Tab A7
Model number: SM-T500
Android OS: 12
Contributor guide
Research direction
Reproduce the failure by enabling Android Test Orchestrator in build.gradle and running the test on the listed Galaxy Tab A7 configuration. Start from the reported ToolConnection and BlockingPublish stack trace and investigate why androidx_test_services.speak_easy has no content provider. Done means the orchestrated test runs instead of producing the fatal log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100