Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UiAutomator2 StackOverflow in AccessibilityNodeInfoHelpers.getVisibleBounds #12892

Closed
tri-fraga opened this issue Jul 11, 2019 · 6 comments
Closed
Labels
UIAutomator2 specific to uiautomator2 driver

Comments

@tri-fraga
Copy link

The problem

When automating certain screens result in an StackOverflowException when getting the AccessibilityNodeInfoHelpers.getVisibleBounds. This is called when getting the UiAutomationElement attributes.

This is also happening when inspecting the app with Appium Desktop Inspector, which results in Appium Desktop loading forever.

I only experience this with UIAutomator2 but UIAutomator1 is working fine.
This bug is similar to #12545 only at a different place.

Again this looks like an application issue but it would be good if UIAutomator2 could catch and handle it.

Environment

  • Appium version (or git revision) that exhibits the issue: Appium v1.14.0-beta.2 (REV d71fc18)
  • Desktop OS/version used to run Appium: Windows 10
  • Node.js version: v11.14.0
  • Npm package manager: 6.10.0
  • Mobile platform/version under test: Android
  • Real device: One Plus 3
  • Appium CLI or Appium.app|exe:

Link to Appium logs

UiAutomator2StackOverflowException.log

Suggested Fix

Here how I quickly fixed it similar to the resolution of #12545 -> Avoid stack overlow exception by limiting the maximum recursion depth:

UiAutomator2StackOverflow.patch

@mykola-mokhnach mykola-mokhnach added the UIAutomator2 specific to uiautomator2 driver label Jul 11, 2019
@mykola-mokhnach
Copy link
Collaborator

I can apply the patch, but it would be interesting to know what prevents you from creating a PR?

@tri-fraga
Copy link
Author

I am still not fluid in git, should I create a pull request?

@mykola-mokhnach
Copy link
Collaborator

it worth trying. Simply fork the project, create a branch there, push your changes and there will be a big green button in GitHub to create a PR. Give it a proper title and description and click create button.

@tri-fraga
Copy link
Author

Alright, I created that pull request

@mykola-mokhnach
Copy link
Collaborator

Cool, added comments

@mykola-mokhnach
Copy link
Collaborator

The fix has been published in appium@beta.
Thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UIAutomator2 specific to uiautomator2 driver
Projects
None yet
Development

No branches or pull requests

2 participants