appium: UIAutomator2 crashes: AppiumUiAutomator2Server:INSTRUMENTATION_RESULT: shortMsg=Process crashed

The problem

UiAutomator2 crashes when initializing a new remote driver

Environment

  • Appium version: 1.8.1
  • Desktop OS: macOS High Sierra 10.16.4
  • Node.js version (unless using Appium.app|exe): v8.6.0
  • Mobile platform/version under test: Nexus 5 X Api level 27 8.1 Oreo
  • Real device or emulator/simulator: Emulator
  • Appium CLI or Appium.app|exe: Appium CLI

Details

I see that in the Server there is a log entry: [debug] [UiAutomator2] [UIAutomator2] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:INSTRUMENTATION_RESULT: shortMsg=Process crashed. This is returning a response in the Appium-Python-Client library (0.26):

{'status': 400, 'value': '{"value":{"message":"Could not proxy command to remote server. Original error: Error: read ECONNRESET","stacktrace":"ProxyRequestError: Could not proxy command to remote server. Original error: Error: read ECONNRESET\\n    at JWProxy.proxy$ (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:152:13)\\n    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)\\n    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)\\n    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)\\n    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)\\n    at <anonymous>"}}'}

Link to Appium logs

Full appium logs: https://gist.github.com/eduardoreynoso/22daff835172c52ccf5dd987f711465c

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (1 by maintainers)

Most upvoted comments

literally still occurs every 3 tests…

  • install appium
  • open /usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib or where the sources are located
  • change the necessary source file there
  • run gulp transplie in the same folder
  • restart appium server