appium: StackOverflowError inside UiAutomatorTestRunner

The problem

When establishing a new Chrome session Appium exits unexpectedly. The device logs show there was a StackOverflowError inside UiAutomatorTestRunner.

This is a continuation from issue #10126

Environment

  • Appium version (or git revision) that exhibits the issue: 1.7.1
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: OS X 12.12.5
  • Node.js version (unless using Appium.app|exe): v9.4.0
  • Mobile platform/version under test: Android 8.1
  • Real device or emulator/simulator: Real. Nexus 5x.
  • Appium CLI or Appium.app|exe: CLI

Details

I am seeing this when starting a session for Chrome. The time stamps on the side of the two logs are from the same clock.

Updating my Nexus 5x to 8.1.0 (OPM5.171019.015, Feb 2018) and the latest Chrome 64.0.3282.137 appears to of triggered this behavior. Updating a another Nexus 5x from 7.x and an earlier chrome to be about the same has also caused this to begin happening on it. I do not see this happening on any of my other devices, which are predominately older versions of Android/Chrome.

Rebooting the devices does not change the outcome. It happens about 50% of the time regardless.

The issue is triggered by: https://github.com/appium/appium-android-bootstrap/blob/master/bootstrap/src/io/appium/android/bootstrap/utils/TheWatchers.java#L51

The returned value and any side affects appear to be completely void piped? The only consumer is: https://github.com/appium/appium-android-bootstrap/blob/e0df190e35baccf31b4e2af81db75cff580631a1/bootstrap/src/io/appium/android/bootstrap/SocketServer.java#L140

Enabling the capability disableAndroidWatchers appears to “fix” the issue, but has the side effect of disabling what appears to be otherwise very nice condition checks: https://github.com/appium/appium-android-bootstrap/blob/master/bootstrap/src/com/android/uiautomator/common/UiWatchers.java#L39

I do not know if what appears to be dead code that triggers this issue was removed/“fixed” if this issue would surface inside the other watchers.

Link to Appium logs

Device logs: https://gist.github.com/jlennox/b2936ba04f53f41916c3778331f10b36 Appium logs: https://gist.github.com/jlennox/3639901543c1347ed221484535cd6f4b

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Go ask on stackoverflow then ? Its theirs error LUL 🤣 JK

hi guys, we experienced this issue after update to Android System Webview (61.0.3163.98).

After we downgrade the webview and use 60 *we also use chromedriver 2.33 because 2.35 only support webview v.62) this issue not happening again.

No particular idea, no. Android 8.1 shoudl be tested with UIAutomator2 is my first thought.

@trix0 Flooding is not appreciated here