UI tests fail on Android 11 with junit.framework.AssertionFailedError: Failed to grant permissions, see logcat for details
Categories
(Firefox for Android :: UI Tests, defect)
Tracking
()
People
(Reporter: cpeterson, Unassigned)
References
Details
From github: https://github.com/mozilla-mobile/fenix/issues/22649.
Steps to reproduce
- With a device running Android 11 (I used a Pixel 2)...
- Run
./gradlew connectedDebugAndroidTestExpected behaviour
Tests pass
Actual behaviour
All tests fail with something like:
org.mozilla.fenix.screenshots.DefaultHomeScreenTest > privateBrowsingTest[Pixel 2 - 11] FAILED junit.framework.AssertionFailedError: Failed to grant permissions, see logcat for details at junit.framework.Assert.fail(Assert.java:50)The logcat says:
12-01 09:34:07.836 19782 19904 E GrantPermissionCallable: Permission: android.permission.WRITE_EXTERNAL_STORAGE cannot be granted!It sounds like this may be related to the storage changes in Android 11.
Device name
No response
Android version
Android 11
Firefox release type
Firefox Nightly
Firefox version
up/main: 9fa9ae3375593e9f7bfd49e4449e5012b0c83d4f
Device logs
No response
Additional information
I don't think we experienced this in a new Android project so it's probably something specific to our Gradle build configuration.
This issue may have blocked our progress on successfully integrating Jetpack Benchmark. The follow-up is get it working is https://github.com/mozilla-mobile/fenix/issues/22480
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•3 years ago
|
||
@aaron, do you know if this was fixed after you work on upgrading to API 30?
Comment 2•3 years ago
|
||
Yeah, adjusting permission requests was one of the steps involved in supporting API 30.
Updated•3 years ago
|
Description
•