все было гладко, вчера внезапно, когда я запустил phonedriver = new AndroidDriver<WebElement>(new URL(APPIUM_SERVER_IP), androidcapabilities)
, возникла проблема:
[ADB] Install command stdout: pkg: /data/local/tmp/appium_cache/7280876e456c1bb793964772b5bcb2ac96ecfcc4.apk
[ADB] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
версия приложения:
v1.17.0
возможность работы с приложением конфигурация:
[Appium] Appium v1.17.0 creating new AndroidUiautomator2Driver (v1.44.2) session
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] "alwaysMatch": {
[BaseDriver] "appium:fastReset": "false",
[BaseDriver] "platformName": "android",
[BaseDriver] "appium:appActivity": "com.tencent.mm.ui.LauncherUI",
[BaseDriver] "appium:appPackage": "com.tencent.mm",
[BaseDriver] "appium:deviceName": "127.0.0.1:62001",
[BaseDriver] "appium:fullReset": "false",
[BaseDriver] "appium:newCommandTimeout": 999999,
[BaseDriver] "appium:noReset": "true",
[BaseDriver] "appium:noSign": true,
[BaseDriver] "appium:platformVersion": "5.1.1",
[BaseDriver] "appium:resetKeyboard": "true",
[BaseDriver] "appium:udid": "127.0.0.1:62001"
[BaseDriver] },
[BaseDriver] "firstMatch": [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
полный журнал приложений:
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appPackage":"com.tencent.mm","noReset":"true","noSign":true,"deviceName":"127.0.0.1:62001","fullReset":"false","appActivity":"com.tencent.mm.ui.LauncherUI","newCommandTimeout":999999,"platformVersion":"5.1.1","fastReset":"false","platformName":"Android","udid":"127.0.0.1:62001","resetKeyboard":"true"},"capabilities":{"firstMatch":[{"appium:appActivity":"com.tencent.mm.ui.LauncherUI","appium:appPackage":"com.tencent.mm","appium:deviceName":"127.0.0.1:62001","fastReset":"false","appium:fullReset":"false","appium:newCommandTimeout":999999,"appium:noReset":"true","appium:noSign":true,"platformName":"android","appium:platformVersion":"5.1.1","appium:resetKeyboard":"true","appium:udid":"127.0.0.1:62001"}]}}
[W3C] Calling AppiumDriver.createSession() with args: [{"appPackage":"com.tencent.mm","noReset":"true","noSign":true,"deviceName":"127.0.0.1:62001","fullReset":"false","appActivity":"com.tencent.mm.ui.LauncherUI","newCommandTimeout":999999,"platformVersion":"5.1.1","fastReset":"false","platformName":"Android","udid":"127.0.0.1:62001","resetKeyboard":"true"},null,{"firstMatch":[{"appium:appActivity":"com.tencent.mm.ui.LauncherUI","appium:appPackage":"com.tencent.mm","appium:deviceName":"127.0.0.1:62001","fastReset":"false","appium:fullReset":"false","appium:newCommandTimeout":999999,"appium:noReset":"true","appium:noSign":true,"platformName":"android","appium:platformVersion":"5.1.1","appium:resetKeyboard":"true","appium:udid":"127.0.0.1:62001"}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1585624669027 (11:17:49 GMT+0800 (中国标准时间))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] fastReset
[Appium]
[Appium] ======================================================================
[Appium] DEPRECATION WARNING:
[Appium]
[Appium] The 'automationName' capability was not provided in the desired
[Appium] capabilities for this Android session
[Appium]
[Appium] Setting 'automationName=UiAutomator2' by default and using the
[Appium] UiAutomator2 Driver
[Appium]
[Appium] The next major version of Appium (2.x) will **require** the
[Appium] 'automationName' capability to be set for all sessions on all
[Appium] platforms
[Appium]
[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] 'automationName=UiAutomator1'
[Appium]
[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add 'automationName=UiAutomator1' to your desired capabilities
[Appium]
[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] 'Drivers' menu
[Appium]
[Appium] ======================================================================
[Appium]
[Appium] Appium v1.17.0 creating new AndroidUiautomator2Driver (v1.44.2) session
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] "alwaysMatch": {
[BaseDriver] "appium:fastReset": "false",
[BaseDriver] "platformName": "android",
[BaseDriver] "appium:appActivity": "com.tencent.mm.ui.LauncherUI",
[BaseDriver] "appium:appPackage": "com.tencent.mm",
[BaseDriver] "appium:deviceName": "127.0.0.1:62001",
[BaseDriver] "appium:fullReset": "false",
[BaseDriver] "appium:newCommandTimeout": 999999,
[BaseDriver] "appium:noReset": "true",
[BaseDriver] "appium:noSign": true,
[BaseDriver] "appium:platformVersion": "5.1.1",
[BaseDriver] "appium:resetKeyboard": "true",
[BaseDriver] "appium:udid": "127.0.0.1:62001"
[BaseDriver] },
[BaseDriver] "firstMatch": [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'fullReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'resetKeyboard' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] fastReset
[BaseDriver] Session created with session id: 7eef794b-5f3e-4477-995c-d40a04965494
[UiAutomator2] Starting 'com.tencent.mm' directly on the device
[ADB] Using 'adb.exe' from 'D:\soft\adt\sdk\platform-tools\adb.exe'
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] Connected devices: [{"udid":"127.0.0.1:62001","state":"device"}]
[AndroidDriver] Using device: 127.0.0.1:62001
[ADB] Using 'adb.exe' from 'D:\soft\adt\sdk\platform-tools\adb.exe'
[ADB] Setting device id to 127.0.0.1:62001
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 22
[ADB] Device API level: 22
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 wait-for-device'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell dumpsys package io.appium.settings'
[ADB] 'io.appium.settings' is installed
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell dumpsys package io.appium.settings'
[ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.1.0' >= '3.1.0')
[ADB] There is no need to install/upgrade 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Using ps-based PID detection
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell ps'
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell settings put secure mock_location 1'
[Logcat] Starting logcat capture
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 forward tcp\:8200 tcp\:6790'
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell dumpsys package io.appium.uiautomator2.server'
[ADB] 'io.appium.uiautomator2.server' is installed
[ADB] Getting package info for 'io.appium.uiautomator2.server'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell dumpsys package io.appium.uiautomator2.server'
[ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.5.5' >= '4.5.5')
[UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[ADB] Checking app cert for C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk
[ADB] Cannot use apksigner tool for signature verification. Original error: Could not find 'apksigner.jar' in ["D:\\soft\\adt\\sdk\\platform-tools\\apksigner.jar","D:\\soft\\adt\\sdk\\emulator\\apksigner.jar","D:\\soft\\adt\\sdk\\tools\\apksigner.jar","D:\\soft\\adt\\sdk\\tools\\bin\\apksigner.jar","D:\\soft\\adt\\sdk\\build-tools\\android-4.4W\\apksigner.jar","D:\\soft\\adt\\sdk\\build-tools\\android-4.4W\\lib\\apksigner.jar"]. Do you have Android Build Tools installed at 'D:\soft\adt\sdk'?
[ADB] Defaulting to verify.jar
[ADB] 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk' is signed with the default certificate
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] 'io.appium.uiautomator2.server.test' is not installed
[ADB] Checking app cert for C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[ADB] Cannot use apksigner tool for signature verification. Original error: Could not find 'apksigner.jar' in ["D:\\soft\\adt\\sdk\\platform-tools\\apksigner.jar","D:\\soft\\adt\\sdk\\emulator\\apksigner.jar","D:\\soft\\adt\\sdk\\tools\\apksigner.jar","D:\\soft\\adt\\sdk\\tools\\bin\\apksigner.jar","D:\\soft\\adt\\sdk\\build-tools\\android-4.4W\\apksigner.jar","D:\\soft\\adt\\sdk\\build-tools\\android-4.4W\\lib\\apksigner.jar"]. Do you have Android Build Tools installed at 'D:\soft\adt\sdk'?
[ADB] Defaulting to verify.jar
[ADB] 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[UiAutomator2] Server packages are going to be (re)installed
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 help'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell 'ls -t -1 /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[ADB] The current Android API does not support extended ls options. Defaulting to no-options call
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell 'ls /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[ADB] The count of applications in the cache: 3
[ADB] The application at 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk' is already cached to '/data/local/tmp/appium_cache/75e2638551246b73c8e1fef0017fc2163110ac3c.apk'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell touch -am /data/local/tmp/appium_cache/75e2638551246b73c8e1fef0017fc2163110ac3c.apk'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell pm install -r /data/local/tmp/appium_cache/75e2638551246b73c8e1fef0017fc2163110ac3c.apk'
[ADB] The installation of 'appium-uiautomator2-server-v4.5.5.apk' took 381ms
[ADB] Install command stdout: pkg: /data/local/tmp/appium_cache/75e2638551246b73c8e1fef0017fc2163110ac3c.apk
[ADB] Success
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 help'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell 'ls /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[ADB] The count of applications in the cache: 3
[ADB] The application at 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already cached to '/data/local/tmp/appium_cache/7280876e456c1bb793964772b5bcb2ac96ecfcc4.apk'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell touch -am /data/local/tmp/appium_cache/7280876e456c1bb793964772b5bcb2ac96ecfcc4.apk'
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell pm install -r /data/local/tmp/appium_cache/7280876e456c1bb793964772b5bcb2ac96ecfcc4.apk'
[ADB] The installation of 'appium-uiautomator2-server-debug-androidTest.apk' took 378ms
[ADB] Install command stdout: pkg: /data/local/tmp/appium_cache/7280876e456c1bb793964772b5bcb2ac96ecfcc4.apk
[ADB] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[WD 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
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 shell am force-stop com.tencent.mm'
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200
[ADB] Running 'D:\soft\adt\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:62001 forward --remove tcp\:8200'
[BaseDriver] Event 'newSessionStarted' logged at 1585624672271 (11:17:52 GMT+0800 (中国标准时间))
[W3C] Encountered internal error running command: Error: pkg: /data/local/tmp/appium_cache/7280876e456c1bb793964772b5bcb2ac96ecfcc4.apk
[W3C] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[W3C] at ADB.install (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:582:13)
[W3C] at UiAutomator2Server.installServerApk (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\uiautomator2.js:121:11)
[W3C] at AndroidUiautomator2Driver.initUiAutomator2Server (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:440:7)
[W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:338:5)
[W3C] at AndroidUiautomator2Driver.createSession (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:212:7)
[W3C] at AppiumDriver.createSession (C:\Program Files\Appium\resources\app\node_modules\appium\lib\appium.js:358:35)
[W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 3246 ms - 825
[HTTP]
что я пробовал:
- добавлена возможность noSign
, установлено true
или false
- очищена /data/local/tmp/appium_cache/
директория в android телефоне