【Appium踩坑】Original error: The instrumentation process cannot be initialized

解决安卓Appium:初始化失败,服务器未安装问题
本文讲述了如何排查并解决Appium中因新设备未安装io.appium.uiautomator2.server且配置中skipServerInstallation=true导致的初始化失败问题,涉及修改配置和检查设备状态。

排查/解决过程:

1、重新执行一次 -> 现象上来看,发现手机上没有打开目标APP,一直报相同错误

Original error: The instrumentation process cannot be initialized

2、报错里有:at UiAutomator2Server.startSession,初步怀疑是 io.appium.uiautomator2.server app问题

  • 查看 Config 里 skipServerInstallation: true
  • 改成 skipServerInstallation: false

3、重新执行一次,成功✅
4、然后再改下 skipServerInstallation: true
(这样下次执行,也不会重复安装io.appium.uiautomator2.server)

根本原因:

新设备没有安装 io.appium.uiautomator2.server,
并且本地配置里 skipServerInstallation: true,
->
这样就跳过安装io.appium.uiautomator2.server ,
导致新设备无法正常启动server

后续排查思路:

如出现类似报错,继续查看 appium 相关的 app 执行情况,如setting、uiautomator2.server 、uiautomator2.test

详细报错信息:

2021-01-07 10:09:47:443 [W3C] Encountered internal error running command: Error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
2021-01-07 10:09:47:443 [W3C]     at Object.errorAndThrow 
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值