question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appium 1.7.1 Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: socket hang up

See original GitHub issue

The problem

I am running test scripts using appium 1.7.1 with uiautomator2 for testing android apps. While running i am getting Error Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: socket hang up at doJwpProxy$ (../../../lib/mjsonwp/mjsonwp.js:384:13) at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)

I am using appium-python-robotframework for writing test scripts. The above error occurs when I am using uiautomator2 for testing Android phones with v7 and above. The automation runs fine when I am using automationName=appium for testing Android phones below v7.

Some times I am getting the ECONNRESET error in between the test cases: WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET

I am getting these two errors switching in between as random. Some of the test cases passes without fail. But some fails with these errors.

Environment

  • Appium version (or git revision) that exhibits the issue: Appium v1.7.1
  • Desktop OS/version used to run Appium: Ubuntu 16.04
  • Node.js version (unless using Appium.app|exe): $ node --version v7.10.1
  • Mobile platform/version under test: Android v 7.0
  • Real device or emulator/simulator: real device
  • Appium CLI or Appium.app|exe: Appium CLI

Details

The uiautomator2 version I am using is: $ npm list -g appium-uiautomator2-driver /usr/lib -- appium@1.7.1 -- appium-uiautomator2-driver@0.6.5

Link to Appium logs

https://gist.github.com/KrishnaprabhaSNaik/7507aab60ab4bb30acf42711a93040b8

This is my link to the appium log.

Code To Reproduce Issue [ Good To Have ]

OpenApplication ${Appium_server} platformName=${Platform_name} platformVersion=${Platform_version} deviceName=${Device_names["${Platform_Version}"]} app=${file_path}/Resources/${Application_APK_name} appActivity=${Activity_name} appPackage=${Package_name} automationName=uiautomator2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:49

github_iconTop GitHub Comments

25reactions
cristiannazirucommented, Jun 14, 2018

Changing from uiautomator2 to appium is not a solution. Appium server is not supported for android 7+.

20reactions
neogeek13commented, Feb 26, 2018

Changing “automationName”: “uiautomator2” to

“automationName”: “appium”

fixed this for non-primary User accounts. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

An unknown server-side error occurred while processing the ...
An unknown server-side error occurred while processing the command. Could not proxy command to remote server. Original error: Error: socket hang ...
Read more >
"Could not proxy command to the remote server. Original error ...
In this video we are going to discuss about How to Resolve: " Could not proxy command to the remote server. Original error...
Read more >
Unknown server issue socket hang up - Appium Discuss
Original error : Could not proxy command to the remote server. Original error: socket hang up [debug] e[35m[W3C (58f83265)]e[39m at ...
Read more >
Original error: Could not proxy command to the remote server ...
Note: sometimes it runs smoothly w/o any error. Dependencies are: DesiredCapabilities cap = new DesiredCapabilities();
Read more >
Could not proxy command to remote server. Original error ...
Env Info: Platform: IOS 11.2 Appium: 1.7.1 Xcode: 9.3 Getting error as below when running test case, [MJSONWP] Encountered internal error ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found