Espresso Device API Failure when Changing Screen Orientation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- mobile-dev, testing
Research direction
Start with the ReplyAppTests class and its app_rotate test from the linked reproduction pull request, using the stated Android, emulator, Espresso Device, and Android Gradle Plugin versions. Reproduce the orientation change failure and investigate the DeviceControllerOperationException; done means the test changes to landscape and finds the "Search emails" node successfully.
Written by the indexing model from the issue text.
Description
Description
While running Espresso device testing, the task "app:connectedDebugAndroidTest" fails. This happens when attempting to set the screen orientation from portrait to landscape within a test case.
Steps to Reproduce
- Pull the code from the following link: https://github.com/takahirom/compose-samples/pull/2/files
- Set the emulator version to 33.1.13-10332831, Android version to 13.0 (T) - API 33.
- Set
androidx-test-espresso-deviceversion to "1.0.0-alpha05" and Android Gradle Plugin version to "8.2.0-alpha10". - Run the code, specifically the
ReplyAppTestsclass with theapp_rotatetest function.
The test function attempts to switch the screen orientation from portrait to landscape, then asserts that a node with the text "Search emails" exists.
Expected Results
The test should change the orientation to landscape successfully and the node with the text "Search emails" should be found.
Actual Results
The test fails with an DeviceControllerOperationException: Failed to set screen orientation. The status code returned is UNAVAILABLE and the cause is a SocketException: socket failed: EPERM (Operation not permitted).
com.example.reply.ReplyAppTests > app_rotate[Pixel_6_Pro_API_33(AVD) - 13] FAILED
androidx.test.espresso.device.controller.DeviceControllerOperationException: Failed to set screen orientation. Status: Status{code=UNAVAILABLE, description=null, cause=java.net.SocketException: socket failed: EPERM (Operation not permitted)
at java.net.Socket.createImpl(Socket.java:517)
Tests on Pixel_6_Pro_API_33(AVD) - 13 failed: There was 1 failure(s).
AndroidX Test and Android OS Versions
AndroidX Test Espresso Device: "1.0.0-alpha05"
Android OS: 13.0 (T) - API 33
Android Gradle Plugin: "8.2.0-alpha08"
Emulator version: 33.1.13-10332831
Link to a public git repo demonstrating the problem:
The issue can be observed in the following pull request: https://github.com/takahirom/compose-samples/pull/2/files
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/android-test
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
android/android-test#681 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
android/android-test#2507 · 1 comment ·
-
ξεκσνδξδ Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2499 ·
-
ησξξσ Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2498 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
android/android-test#2473 ·
All issues in android/android-test
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
checkstyle/test-configs#263 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·