You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Set the emulator version to 33.1.13-10332831, Android version to 13.0 (T) - API 33.
Set androidx-test-espresso-device version to "1.0.0-alpha05" and Android Gradle Plugin version to "8.2.0-alpha10".
Run the code, specifically the ReplyAppTests class with the app_rotate test 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:
If there's anything I could potentially fix by making adjustments on my own, I'm willing to try.
takahirom
changed the title
Espresso Device Testing Failure when Changing Screen Orientation
Espresso Device API Failure when Changing Screen Orientation
Jul 3, 2023
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
androidx-test-espresso-device
version to "1.0.0-alpha05" and Android Gradle Plugin version to "8.2.0-alpha10".ReplyAppTests
class with theapp_rotate
test 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 isUNAVAILABLE
and the cause is aSocketException: socket failed: EPERM (Operation not permitted)
.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
The text was updated successfully, but these errors were encountered: