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
Inspecting elements using Appium inspector/finding elements with xpath/ clicking elements causes Appium to fall into infinite recursion (specifically, appium-uiautomator2-server). However, finding elements by class name and by id works fine. Appium only exhibits this behaviour with a particular page in the page, the other pages function normally. UiAutomator1 was used as well and behaves normally.
Environment
Appium version (or git revision) that exhibits the issue: Appium 1.12.1 UiAutomator2
Desktop OS/version used to run Appium: Windows 10
Mobile platform/version under test: Android 9
Real device or emulator/simulator: Real device ( Huawei, Samsung)
Appium CLI or Appium.app|exe: Appium.exe
Details
The stack seems to suggest that AccessibilityNodeInfoHelpers.getVisibleBounds will cause an infinite loop of UiAutomationElement. -> UiAutomationElement.getOrCreateElement -> UiAutomationElement.buildChildren. until it causes a StackOverflowError.
The fact that elements can be found via id but as soon as I try to do anything to do with display like .click(), the error occurs seems to suggest the same thing.
Fatal error while handling action in: io.appium.uiautomator2.handler.Source
java.lang.StackOverflowError: stack size 1041KB
at android.app.WindowConfiguration.setAppBounds(WindowConfiguration.java:332)
at android.app.WindowConfiguration.setAppBounds(WindowConfiguration.java:319)
at android.app.WindowConfiguration.setTo(WindowConfiguration.java:388)
at android.content.res.Configuration.setTo(Configuration.java:1136)
at android.content.res.Configuration.(Configuration.java:1091)
at android.view.DisplayAdjustments.(DisplayAdjustments.java:36)
at android.view.Display.(Display.java:444)
at android.view.Display.(Display.java:434)
at android.hardware.display.DisplayManagerGlobal.getCompatibleDisplay (DisplayManagerGlobal.java:276)
at android.app.ResourcesManager.getAdjustedDisplay(ResourcesManager.java:328)
at android.app.ContextImpl.getDisplay(ContextImpl.java:2441)
at android.view.WindowManagerImpl.getDefaultDisplay(WindowManagerImpl.java:147)
at androidx.test.uiautomator.UiDevice.getDefaultDisplay(UiDevice.java:1090)
at androidx.test.uiautomator.UiDevice.getDisplayWidth(UiDevice.java:524)
at io.appium.uiautomator2.core.AccessibilityNodeInfoHelpers.getVisibleBounds (AccessibilityNodeInfoHelpers.java:96)
at io.appium.uiautomator2.model.UiAutomationElement. (UiAutomationElement.java:85)
at io.appium.uiautomator2.model.UiAutomationElement.getOrCreateElement (UiAutomationElement.java:127)
at io.appium.uiautomator2.model.UiAutomationElement.buildChildren (UiAutomationElement.java:165)
at io.appium.uiautomator2.model.UiAutomationElement. (UiAutomationElement.java:89)
at io.appium.uiautomator2.model.UiAutomationElement.getOrCreateElement (UiAutomationElement.java:127)
at io.appium.uiautomator2.model.UiAutomationElement.buildChildren (UiAutomationElement.java:165)
at io.appium.uiautomator2.model.UiAutomationElement. (UiAutomationElement.java:89)
at io.appium.uiautomator2.model.UiAutomationElement.getOrCreateElement (UiAutomationElement.java:127)
at io.appium.uiautomator2.model.UiAutomationElement.buildChildren (UiAutomationElement.java:165)
at io.appium.uiautomator2.model.UiAutomationElement. (UiAutomationElement.java:89)
The problem
Inspecting elements using Appium inspector/finding elements with xpath/ clicking elements causes Appium to fall into infinite recursion (specifically, appium-uiautomator2-server). However, finding elements by class name and by id works fine. Appium only exhibits this behaviour with a particular page in the page, the other pages function normally. UiAutomator1 was used as well and behaves normally.
Environment
Details
The stack seems to suggest that AccessibilityNodeInfoHelpers.getVisibleBounds will cause an infinite loop of UiAutomationElement. -> UiAutomationElement.getOrCreateElement -> UiAutomationElement.buildChildren. until it causes a StackOverflowError.
The fact that elements can be found via id but as soon as I try to do anything to do with display like .click(), the error occurs seems to suggest the same thing.
Link to Appium logs
Appium Log
Line 157 shows the infinite recursion.
adb logcat
Both of the logs show the StackOverFlow Error that is very likely the cause of the issue.
Please, any hint is greatly appreciated.
The text was updated successfully, but these errors were encountered: