android / android/android-test
PermissionRequester throws java.lang.RuntimeException: Error while connecting UiAutomation on API < 28
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
When using `PermissionRequester` in an instrumented test on API < 28, there's a RuntimeException that says "Error while connecting UiAutomation"
### Steps to Reproduce
Create a custom test runner
Request permissions in either `callApplicationOnCreate()` or `callActivityOnCreate()` through `PermissionRequester` API
Run instrumented test on API < 28
### Expected Results
Permission is granted and can be utilized
### Actual Results
Test crashes before even starting
### AndroidX Test and Android OS Versions
Test: 1.2.0
API < 28, tested down to 25
### Link to a public git repo demonstrating the problem:
https://github.com/PaulKlauser/PermissionRequesterCrash
Contributor guide
Research direction
Start by reproducing the crash from the linked public repository with AndroidX Test 1.2.0 on an API below 28. Trace the PermissionRequester calls made from callApplicationOnCreate() or callActivityOnCreate() in the custom test runner. Done means the instrumented test starts without the UiAutomation connection exception and the requested permission is granted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100