-
Notifications
You must be signed in to change notification settings - Fork 307
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
Instrumented test execution with ANDROIDX_TEST_ORCHESTRATOR does not work with Android 11 #743
Comments
I am also experiencing this bug. I also made a test application that experiences the same indefinite hanging on Android 11: https://github.com/prfarlow1/UiTestApplication |
Same issue is occurring when compiling and targeting SDK 30 and running against an emulator with 30.
|
Can we get an update from the Android test team when this will be addressed? This is a really bad bug. We rely on the orchestrator for our tests to pass and right now we just can't run our tests on Android 11 test devices. |
Same here. Everything was working fine with emulator api 29 and Orchestrator until we migrated to api 30. |
Hey all, sorry for delayed response. We are looking into this, but the fix is proving more difficult to get released than anticipated. We hope to have something out soon to address this. |
Same here. Switched to Android 10 and it's working fine for me. |
Please give 1.3.1-alpha01 a try. This should hopefully be fixed. |
Can't confirm it works :/ It doesn't hang indeed, but still fails with a message:
Failed run: |
I also could not get my tests to work with the new 1.3.1-alpha01 |
It looks like there is an incompatibility with the testInstrumentationRunnerArguments clearPackageData: 'true' setting. I was able to get @mateuszkwiecinski sample working by commenting out that line. |
Enable clearPackageData
A workaround for the clearPackageData issue is to declare a application android:forceQueryable="true" in the androidTest manifest |
What does android:forceQueryable="true" actually do? I can't find any documentation for it |
Check out the docs on the new package visibility restrictions on API 30 here IIUC using forceQueryable basically lets other apps (like the orchestrator app) communicate with the test package. |
This fixes using 'clearPackageData' on API 30 by making test apps (that build androidx.test.runner) callable from androidx.test.orchestrator. Fixes #743 PiperOrigin-RevId: 337944463
This fixes using 'clearPackageData' on API 30 by making test apps (that build androidx.test.runner) callable from androidx.test.orchestrator. Fixes #743 PiperOrigin-RevId: 337944463
Please give 1.3.1-alpha02 a try |
Thank you @brettchabot 👍 |
whew thanks for confirming @mateuszkwiecinski |
|
are you using studio 4.2 beta 6 ? |
Using logcat said about some new permission issue:
I don't know what else to try. |
FYI 1.4.0-alpha06 released which has a fix for the forceQueryable bug: https://github.com/android/android-test/releases/tag/androidx-test-1.4.0-alpha06 |
Still getting If I explicitly install with |
@krisjwolff what Studio + AGP version are you using? You need to use Android Studio 4.2+ . Only in this version and later will Studio use the --force-queryable flag when installing the service apks. |
I am using 1.4.0-alpha06 and this still doesn't work for me on firebase test lab. Every other api level is fine except 11. |
@alex-tyro thanks for the report. I was able to repro on FTL and I filed bug against them. Unfortunately due to the android11 package visibility changes there is nothing we can do on the androidx.test library to address this. FTL will need the same fix as Studio: adding a '--force-queryable' flag when installing the service apks. |
@brettchabot Thank you for filing a bug with FTL. Is that ticket publicly-available, so I can watch it? |
Unfortunately I could not find an easy way to file an publically visible bug. I can update this issue when FTL responds if that works? |
That would be fantastic, thank you for keeping us up-to-date. |
Yes please. That's very helpful, thanks! |
For the record, these are the versions we ended up using with Android 11 emulators and so far so good:
with version |
I'd be cautious about drawing any conclusions based on Android 11 emulators. IIUC the images are dated and do not have the final package visibility handling. In my testing I saw different behavior on Android 11 devices and Android S emulator images. |
I'm still seeing the issue even with installing using
This is with 1.4.0-alpha06 on a Pixel 3 Android 11 (RQ1A.210205.004). |
@larryng that seems like a separate issue than the one discussed here. Can you file a new issue? |
@krisjwolff @prfarlow1 FTL has made a fix. They expect it should get deployed in the next week or two. |
@brettchabot Apologies, the issue was with allure-kotlin, though the error messages in Orchestrator are a noisy red herring. |
have you managed to find a workaround? Can't make it work with |
@QAutomatron Here you go. If you have any questions, please ask there instead. I don't want to continue pinging others on this thread. |
|
I am observing the same issue with |
I am observing the same issue with
this issue is hap aping in case command run via |
related issues for docs update: https://issuetracker.google.com/issues/262661481 |
Description
Similar to #355, but the execution hangs
Steps to Reproduce
Expected Results
The test passes
Actual Results
mkdir: ‘/storage/emulated/0/Android/data/my.app.package’: Permission denied
which points atDeviceProviderInstrumentTestTask
andgetAdditionalTestOutputEnabled
which tries to save some log file. disabling theandroid.enableAdditionalTestOutput
property removes themkdir
error but the test still hangsAndroidX Test and Android OS Versions
Android OS Versions: the issue exists only on API 30. The test passes on lower apis.
Link to a public git repo demonstrating the problem:
https://github.com/mateuszkwiecinski/orchestrator_doesnt_work
![image](https://user-images.githubusercontent.com/36954793/93256276-684ba180-f79b-11ea-8e1d-19dafc1e79d8.png)
task:
./gradlew connectedDebugAndroidTest
hangs and never endsGithub action run confirming the issue: https://github.com/mateuszkwiecinski/orchestrator_doesnt_work/pull/1/checks?check_run_id=1119649523
The text was updated successfully, but these errors were encountered: