无法将命令代理到远程服务器.原始错误:错误:读取 ECONNRESET [英] Could not proxy command to remote server. Original error: Error: read ECONNRESET

查看:33
本文介绍了无法将命令代理到远程服务器.原始错误:错误:读取 ECONNRESET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法运行之前运行的自动化脚本.当我尝试在新设备上运行相同的代码时,它工作正常.

I am not able to run the automation script that was running earlier. When i try to run the same code in new device its works fine.

Appium 服务器日志

[UiAutomator2] 运行命令:'adb -s K3V4C18B16002502 shell am仪器 -wio.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'[UiAutomator2] 等待 UiAutomator2 在线时间长达 20000 毫秒...[调试] [JSONWP 代理] 将/status"与命令名称getStatus"匹配[调试] [JSONWP 代理] 代理 [GET/status] 到 [GEThttp://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][UiAutomator2] [UIAutomator2] android.util.AndroidException:INSTRUMENTATION_FAILED:io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner[调试] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_STATUS:错误=无法找到以下的检测信息:组件信息{io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner}[调试] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_STATUS:id=ActivityManagerService [调试] [UiAutomator2] [UIAutomator2]INSTRUMENTATION_STATUS_CODE:-1 [调试] [UiAutomator2] [UIAutomator2]在 com.android.commands.am.Instrument.run(Instrument.java:486)[调试] [UiAutomator2] [UIAutomator2] 在com.android.commands.am.Am.runInstrument(Am.java:194) [调试][UiAutomator2] [UIAutomator2] 在com.android.commands.am.Am.onRun(Am.java:80) [调试] [UiAutomator2][UIAutomator2] 在com.android.internal.os.BaseCommand.run(BaseCommand.java:54) [调试][UiAutomator2] [UIAutomator2] 在com.android.commands.am.Am.main(Am.java:50) [调试] [UiAutomator2][UIAutomator2] 在com.android.internal.os.RuntimeInit.nativeFinishInit(本机方法)[调试] [UiAutomator2] [UIAutomator2] 在com.android.internal.os.RuntimeInit.main(RuntimeInit.java:371) [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][JSONWP 代理] 将/status"与命令名称getStatus"匹配 [debug][JSONWP 代理] 将 [GET/status] 代理到 [GET]http://localhost:8200/wd/hub/status] 没有正文 [JSONWP 代理]] 得到了意外的回应:{"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [调试][UiAutomator2] 删除 UiAutomator2 会话 [debug] [UiAutomator2]删除 UiAutomator2 服务器会话 [debug] [JSONWP Proxy] 匹配'/' to command name 'deleteSession' [UiAutomator2] 没有得到确认 UiAutomator2 deleteSession 工作;错误是:UnknownError:处理时发生未知的服务器端错误命令.原始错误:尝试代理会话命令而没有会话 ID [调试] [UiAutomator2] 将 IME 重置为'com.touchtype.swiftkey/com.touchtype.KeyboardService' [调试] [亚行]运行'/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037-s K3V4C18B16002402 shell ime set com.touchtype.swiftkey/com.touchtype.KeyboardService' [debug] [ADB]运行'/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037-s K3V4C18B16002402 shell am force-stop eu.niko.smart.naswi.personalization' [debug] [Logcat] 停止 logcat捕获 [debug] [ADB] 删除转发的端口套接字连接:8200[调试] [亚行] 运行'/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -sK3V4C18B16002402 forward --remove tcp:8200' [debug] [ADB] Device API级别:28 [UiAutomator2] 将隐藏的 api 策略恢复到设备默认配置 [debug] [ADB] 运行'/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -sK3V4C18B16002402 shell 设置删除全局hidden_​​api_policy_pre_p_apps' [调试] [ADB] 正在运行'/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -sK3V4C18B16002402 shell 设置删除全局hidden_​​api_policy_p_apps' [debug] [BaseDriver] 事件'newSessionStarted' 记录于 1549963457849 (15:09:17 GMT+0545 (Nepal)Time)) [debug] [W3C] 运行命令遇到内部错误:UnknownError:处理时发生未知的服务器端错误命令.原始错误:无法将命令代理到远程服务器.原始错误:错误:读取 ECONNRESET [debug] [W3C] atJWProxy.command(/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:236:13)[HTTP] <-- POST/wd/hub/session 500 50913 ms - 532

[UiAutomator2] Running command: 'adb -s K3V4C18B16002502 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' [UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online... [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [UiAutomator2] [UIAutomator2] android.util.AndroidException: INSTRUMENTATION_FAILED: io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner [debug] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner} [debug] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_STATUS: id=ActivityManagerService [debug] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_STATUS_CODE: -1 [debug] [UiAutomator2] [UIAutomator2] at com.android.commands.am.Instrument.run(Instrument.java:486) [debug] [UiAutomator2] [UIAutomator2] at com.android.commands.am.Am.runInstrument(Am.java:194) [debug] [UiAutomator2] [UIAutomator2] at com.android.commands.am.Am.onRun(Am.java:80) [debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.BaseCommand.run(BaseCommand.java:54) [debug] [UiAutomator2] [UIAutomator2] at com.android.commands.am.Am.main(Am.java:50) [debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) [debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:371) [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus' [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [JSONWP Proxy] Got an unexpected response: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} [debug] [UiAutomator2] Deleting UiAutomator2 session [debug] [UiAutomator2] Deleting UiAutomator2 server session [debug] [JSONWP Proxy] Matched '/' to command name 'deleteSession' [UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id [debug] [UiAutomator2] Resetting IME to 'com.touchtype.swiftkey/com.touchtype.KeyboardService' [debug] [ADB] Running '/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -s K3V4C18B16002402 shell ime set com.touchtype.swiftkey/com.touchtype.KeyboardService' [debug] [ADB] Running '/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -s K3V4C18B16002402 shell am force-stop eu.niko.smart.naswi.personalization' [debug] [Logcat] Stopping logcat capture [debug] [ADB] Removing forwarded port socket connection: 8200 [debug] [ADB] Running '/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -s K3V4C18B16002402 forward --remove tcp:8200' [debug] [ADB] Device API level: 28 [UiAutomator2] Restoring hidden api policy to the device default configuration [debug] [ADB] Running '/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -s K3V4C18B16002402 shell settings delete global hidden_api_policy_pre_p_apps' [debug] [ADB] Running '/Users/infotmt/Library/Android/sdk/platform-tools/adb -P 5037 -s K3V4C18B16002402 shell settings delete global hidden_api_policy_p_apps' [debug] [BaseDriver] Event 'newSessionStarted' logged at 1549963457849 (15:09:17 GMT+0545 (Nepal Time)) [debug] [W3C] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET [debug] [W3C] at JWProxy.command (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:236:13) [HTTP] <-- POST /wd/hub/session 500 50913 ms - 532

Java 错误日志

org.openqa.selenium.SessionNotCreatedException:无法创建新的远程会话.请检查服务器日志以获取更多详细信息.原来的错误:处理时发生未知的服务器端错误命令.原始错误:无法将命令代理到远程服务器.原始错误:错误:读取 ECONNRESET 构建信息:版本:'3.141.59',修订版:'e82be7d358',时间:'2018-11-14T08:17:03' 系统信息:主机:'Suban12.local',IP:'fe80:0:0:0:486:de1:7ae1:b02d%en0',os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3',java.version:'1.8.0_202'驱动信息:driver.version:AndroidDriver远程堆栈跟踪:UnknownError:发生未知的服务器端错误在处理命令时.原始错误:无法代理命令到远程服务器.原始错误:错误:读取 ECONNRESET在 JWProxy.command (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:236:13)构建信息:版本:'3.141.59',修订版:'e82be7d358',时间:'2018-11-14T08:17:03' 系统信息:主机:'Suban12.local',ip:'fe80:0:0:0:486:de1:7ae1:b02d%en0', os.name: 'Mac OS X', os.arch:'x86_64', os.version: '10.14.3', java.version: '1.8.0_202' 驱动信息:driver.version:AndroidDriver

org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'Suban12.local', ip: 'fe80:0:0:0:486:de1:7ae1:b02d%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '1.8.0_202' Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET at JWProxy.command (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:236:13) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'Suban12.local', ip: 'fe80:0:0:0:486:de1:7ae1:b02d%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '1.8.0_202' Driver info: driver.version: AndroidDriver

在io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)在io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)在io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)在io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)在 io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)在io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)在org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)在org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)在io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)在 io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)在 io.appium.java_client.AppiumDriver.(AppiumDriver.java:94)在io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:95)在 util.AppiumHelper.setupPersDriver(AppiumHelper.java:74) 在test_cases.PersHelper.startPersAppReset(PersHelper.java:21) 在sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在 java.lang.reflect.Method.invoke(Method.java:498) 在org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)在 org.testng.internal.Invoker.invokeMethod(Invoker.java:583) 在org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719) 在org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989) 在org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)在org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)在 org.testng.TestRunner.privateRun(TestRunner.java:648) 在org.testng.TestRunner.run(TestRunner.java:505) 在org.testng.SuiteRunner.runTest(SuiteRunner.java:455) 在org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) 在org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) 在org.testng.SuiteRunner.run(SuiteRunner.java:364) 在org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 在org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) 在org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) 在org.testng.TestNG.runSuitesLocally(TestNG.java:1137) 在org.testng.TestNG.runSuites(TestNG.java:1049) 在org.testng.TestNG.run(TestNG.java:1017) 在org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73) 在org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)引起:java.lang.reflect.InvocationTargetException atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在 java.lang.reflect.Method.invoke(Method.java:498) 在io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)... 38 多个引起:org.openqa.selenium.WebDriverException:An处理命令时发生未知的服务器端错误.原始错误:无法将命令代理到远程服务器.原来的错误:错误:读取 ECONNRESET 构建信息:版本:'3.141.59',修订版:'e82be7d358',时间:'2018-11-14T08:17:03' 系统信息:主机:'Suban12.local', ip: 'fe80:0:0:0:486:de1:7ae1:b02d%en0', os.name: 'MacOS X', os.arch: 'x86_64', os.version: '10.14.3', java.version:'1.8.0_202' 驱动信息:driver.version:AndroidDriver 远程堆栈跟踪:UnknownError:发生未知的服务器端错误处理命令.原始错误:无法将命令代理到远程服务器.原始错误:错误:读取 ECONNRESET在 JWProxy.command (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:236:13)在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native方法)在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)在 java.lang.reflect.Constructor.newInstance(Constructor.java:423)在org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)在org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)在org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)在java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)在java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)在java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)在java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)在java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)在java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)在java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)在java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)在java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)……还有 43 个

at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208) at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:94) at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:95) at util.AppiumHelper.setupPersDriver(AppiumHelper.java:74) at test_cases.PersHelper.startPersAppReset(PersHelper.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) at org.testng.internal.Invoker.invokeMethod(Invoker.java:583) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) at org.testng.TestRunner.privateRun(TestRunner.java:648) at org.testng.TestRunner.run(TestRunner.java:505) at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) at org.testng.SuiteRunner.run(SuiteRunner.java:364) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) at org.testng.TestNG.runSuitesLocally(TestNG.java:1137) at org.testng.TestNG.runSuites(TestNG.java:1049) at org.testng.TestNG.run(TestNG.java:1017) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186) ... 38 more Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'Suban12.local', ip: 'fe80:0:0:0:486:de1:7ae1:b02d%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '1.8.0_202' Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET at JWProxy.command (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:236:13) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62) at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128) ... 43 more

推荐答案

我找到了这个问题的答案.解决方案是从设备中删除 io.appium.uiautomator2.serverio.appium.uiautomator2.server.test.

I found the answer to this problem. The solution is to remove io.appium.uiautomator2.server and io.appium.uiautomator2.server.test from the device.

  1. 确保 appium 服务器没有执行.
  2. 使用 USB 连接您的 android 设备,同时使用以下命令验证设备是否已正确连接:
  1. Make sure appium server is not executing.
  2. Connect your android device with USB, also verify that device is connected properly by using command:
adb devices

  • 执行以下命令:

  • Execute below commands:

    adb uninstall io.appium.uiautomator2.server
    adb uninstall io.appium.uiautomator2.server.test
    

  • 启动 appium 服务器
  • 开始执行 appium 测试用例
  • 这篇关于无法将命令代理到远程服务器.原始错误:错误:读取 ECONNRESET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆