Appium appium 使用 appium-desktop 可以正常使用,使用命令行启动报如下错误,谁能帮忙看下呢

xcxcxxcxcxxc · February 24, 2020 · Last by 猫星人 replied at May 14, 2020 · Last modified by admin 恒温 · 3173 hits
020-02-23 05:24:01:194 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'
2020-02-23 05:24:01:238 [ADB] 'io.appium.uiautomator2.server.test' is installed
2020-02-23 05:24:01:239 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
2020-02-23 05:24:01:745 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 uninstall io.appium.uiautomator2.server.test'
2020-02-23 05:24:02:040 [ADB] 'adb uninstall io.appium.uiautomator2.server.test' command output: Success
2020-02-23 05:24:02:041 [ADB] io.appium.uiautomator2.server.test was successfully uninstalled
2020-02-23 05:24:02:045 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 shell 'ls /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
2020-02-23 05:24:02:063 [ADB] The count of applications in the cache: 6
2020-02-23 05:24:02:064 [ADB] The application at '/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-server@4.5.5@appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is already cached to '/data/local/tmp/appium_cache/8d4156e508daae39c3f4815552e22e311432ff1f.apk'
2020-02-23 05:24:02:065 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 shell touch -am /data/local/tmp/appium_cache/8d4156e508daae39c3f4815552e22e311432ff1f.apk'
2020-02-23 05:24:02:077 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 shell pm install -r /data/local/tmp/appium_cache/8d4156e508daae39c3f4815552e22e311432ff1f.apk'
2020-02-23 05:24:02:442 [ADB] The installation of 'appium-uiautomator2-server-debug-androidTest.apk' took 366ms
2020-02-23 05:24:02:443 [ADB] Install command stdout: pkg: /data/local/tmp/appium_cache/8d4156e508daae39c3f4815552e22e311432ff1f.apk
2020-02-23 05:24:02:443 [ADB] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
2020-02-23 05:24:02:446 [UiAutomator2] Deleting UiAutomator2 session
2020-02-23 05:24:02:446 [UiAutomator2] Deleting UiAutomator2 server session
2020-02-23 05:24:02:448 [WD Proxy] Matched '/' to command name 'deleteSession'
2020-02-23 05:24:02:449 [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
2020-02-23 05:24:02:450 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.xueqiu.android'
2020-02-23 05:24:02:893 [Logcat] Stopping logcat capture
2020-02-23 05:24:02:896 [ADB] Removing forwarded port socket connection: 8200
2020-02-23 05:24:02:897 [ADB] Running '/Users/xulei/Library/Android/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8200'
2020-02-23 05:24:02:912 [BaseDriver] Event 'newSessionStarted' logged at 1582435442912 (13:24:02 GMT+0800 (中国标准时间))
2020-02-23 05:24:02:987 [W3C] Encountered internal error running command: Error: pkg: /data/local/tmp/appium_cache/8d4156e508daae39c3f4815552e22e311432ff1f.apk
2020-02-23 05:24:02:987 [W3C] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
2020-02-23 05:24:02:987 [W3C] at ADB.install (/usr/local/lib/node_modules/appium/node_modules/_appium-adb@7.20.0@appium-adb/lib/tools/apk-utils.js:547:13)
2020-02-23 05:24:02:988 [W3C] at UiAutomator2Server.installServerApk (/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-driver@1.44.0@appium-uiautomator2-driver/lib/uiautomator2.js:121:11)
2020-02-23 05:24:02:988 [W3C] at AndroidUiautomator2Driver.initUiAutomator2Server (/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-driver@1.44.0@appium-uiautomator2-driver/lib/driver.js:436:7)
2020-02-23 05:24:02:988 [W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-driver@1.44.0@appium-uiautomator2-driver/lib/driver.js:334:5)
2020-02-23 05:24:02:988 [W3C] at AndroidUiautomator2Driver.createSession (/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-driver@1.44.0@appium-uiautomator2-driver/lib/driver.js:208:7)
2020-02-23 05:24:02:989 [W3C] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:358:35)
2020-02-23 05:24:03:020 [W3C] Destroying socket connection
2020-02-23 05:24:03:023 [HTTP] <-- POST /wd/hub/session 500 6212 ms - 805
共收到 8 条回复 时间 点赞

[W3C] Encountered internal error running command: Error: pkg: /data/local/tmp/appium_cache/8d4156e508daae39c3f4815552e22e311432ff1f.apk
2020-02-23 05:24:02:987 [W3C] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

日志里写的清清楚楚。

https://testerhome.com/search?q=INSTALL_PARSE_FAILED_NO_CERTIFICATES

恒温 回复

您好,是这样解决吗,这个已经开启了 'INSTALL_PARSE_FAILED_NO_CERTIFICATES': '文件未通过认证 >> 设置开启未知来源

问题解决了吗?如何操作的

yangyingjie 回复

没解决,在adb安装appium-uiautomator2-server-debug-androidTest.apk这个apk时一直报上面日志那个错误

我和你一样的问题 你解决了没

appium_cache满了

这个问题可以通过重启模拟器解决,也可以通过:adb -P 5037 -s emulator-5554 shell rm -r /data/local/tmp/appium_cache来解决,前面这个是我的蠢办法,后面这个是同事才研究出来的

https://blog.csdn.net/qq_42666676/article/details/94568651 看看这个,我遇到了,增加这个就行了。。。。楼上的我全部试了,不行。。。。

'好吧,那就多加一个参数试一试吧。
‘automationName=UiAutomator1’
再次启动:'

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up