appium报错处理方法

Encountered internal error running command: UnknownError: 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

运行命令时遇到内部错误:UnknownError:在处理命令时发生了未知的服务器端错误。原始错误:无法将命令代理到远程服务器。原错误:socket挂起

解决方案:重启手机,重新连接设备

---------------------------------------------------------

Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details

运行命令时遇到内部错误:UnknownError:在处理命令时发生了未知的服务器端错误。原始错误:'POST /element'不能代理到UiAutomator2服务器,因为检测进程没有运行(可能崩溃)。查看服务器日志和/或logcat输出以获得更多详细信息
解决方案:
解决 appium 当中 uiautomator2 无法启动的问题 - 王雨泽 - 博客园
          在启动 appium 程序中,有时候会出现 uiautomator2 服务无法启动的错误,appium 的日志           截图如下:

           

错误信息:ActivityManager: Unable to find instrumentation info for: ComponentInfo{io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner}

解决办法:

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

没有得到确认UiAutomator2 deleteSession工作;错误是:UnknownError:在处理命令时发生了未知的服务器端错误。原始错误:试图代理一个没有会话id的会话命令

解决方案:大概率是设备未连接上,确认IP是否正确,可参考此文章逐一排查:

ADB+Python+Appium连接真机操作步骤说明及报错解决方案_想做测开的点工-CSDN博客

Encountered internal error running command: Error executing adbExec. Original error: 'Command ''D:\\Program Files (x86)\\android-sdk-windows\\platform-tools\\adb.exe' -P 5037 -s 192.168.137.161\:5555 install -r C:\\Users\\589757\\AppData\\Local\\Programs\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-v4.21.1.apk' exited with code 1'; Stderr: 'adb: failed to install C:\Users\589757\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.21.1.apk: Failure [INSTALL_FAILED_ABORTED: User rejected permissions]'; Code: '1'

解决方案:
安卓真机调试[INSTALL_FAILED_ABORTED: User rejected permissions] - 程序员大本营

 

Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details

If you wish to use that automation instead of UiAutomator2, please add 'automationName=UiAutomator1' to your desired capabilities

解决方案:

Python+appium自动化踩坑(二):Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output. - piecesof - 博客园
 

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值