[Solved] appium Original error: Could not proxy command to the remote server. Original error: socket hang up

When the appium inspector records the app of oppo real machine, an error occurs in the third or fourth step of operation:

Call to 'tap' failed
[performTouchAction([{"action":"tap","options":{"x":782,"y":1358}}])] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up

Appium error log:

After investigation, the solution is as follows:

1. When appium desktop starts, it is necessary to use advanced mode, –session-override is set to true;

2. Enter the OPPO mobile phone, go to Settings->Apps->Special application permissions, and set appium settings, io.uiautomator2.server, io.uiautomator2.server.test in the permission list to allow;

After this setting, restart appium inspector, record, and no longer report that error.

I guess that appium suddenly failed to record before, or it was related to appium’s application permissions on OPPO mobile phones. The system services in the mobile phone may suddenly force stop Force stopping io.appium.uiautomator2.server.test

 

Read More: