测试人社区

Appium 运行报错

windows appium 命令行启动appium服务,运行报错信息如下:

[debug] [W3C] Encountered internal error running command: Error: pkg: /data/local/tmp/appium_cache/8d4156e508daae39c3f4815552e22e311432ff1f.apk
[debug] [W3C] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[debug] [W3C]     at ADB.install (C:\Users\AndyJee\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:582:13)
[debug] [W3C]     at UiAutomator2Server.installServerApk (C:\Users\AndyJee\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\uiautomator2.js:121:11)
[debug] [W3C]     at AndroidUiautomator2Driver.initUiAutomator2Server (C:\Users\AndyJee\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:440:7)
[debug] [W3C]     at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\AndyJee\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:338:5)
[debug] [W3C]     at AndroidUiautomator2Driver.createSession (C:\Users\AndyJee\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:212:7)
[debug] [W3C]     at AppiumDriver.createSession (C:\Users\AndyJee\AppData\Roaming\npm\node_modules\appium\lib\appium.js:358:35)
[debug] [W3C] Destroying socket connection

解决:
Desirecap 里面添加下面参数

‘automationName=UiAutomator1’

这个问题是运行appIum1.17.1这个版本遇到的,然后降级到1.15.1这个版本就可以了。

npm uninstall -g appium   #卸载appium
npm install -g appium@1.15.1   #重新安装appium 1.15.1这个版本
2 Likes

有用!