使用 automationName 框架为 uiautomator2 报错了,大佬帮帮忙
[Appium] Welcome to Appium v1.7.2
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android"}},"desiredCapabilities":{"deviceName":"127.0.0.1:21503","appActivity":"com.tal.kaoyan.ui.activity.SplashActivity","appPackage":"com.tal.kaoyan","automationName":"uiautomator2","platformName":"Android","platforVersion":"5.1.1"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"deviceName":"127.0.0.1:21503","appActivity":"com.tal.kaoyan.ui.activity.SplashActivity","appPackage":"com.tal.kaoyan","automationName":"uiautomator2","platformName":"Android","platforVersion":"5.1.1"},null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android"}}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1536205623359 (11:47:03 GMT+0800 (中国标准时间))
[Appium] Merged W3C capabilities {"firstMatch":[{}],"alwaysMatch":{"platformName... into desiredCapabilities object {"deviceName":"127.0.0.1:21503","appActivity":"...
[Appium] Creating new AndroidUiautomator2Driver (v0.11.0) session
[Appium] Capabilities:
[Appium] deviceName: 127.0.0.1:21503
[Appium] appActivity: com.tal.kaoyan.ui.activity.SplashActivity
[Appium] appPackage: com.tal.kaoyan
[Appium] automationName: uiautomator2
[Appium] platformName: Android
[Appium] platforVersion: 5.1.1
[debug] [BaseDriver] W3C capabilities [] and MJSONWP desired capabilities were provided
[BaseDriver] Falling back to MJSONWP desired capabilities
[BaseDriver] The following capabilities were provided, but are not recognized by appium: platforVersion.
[BaseDriver] Session created with session id: 9d54b724-68d0-46b6-960e-41f17672e99d
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_131
[ADB] Checking whether adb is present
[ADB] Found 5 'build-tools' folders under 'D:\appium_test\sdk' (newest first):
[ADB] D:/appium_test/sdk/build-tools/28.0.0
[ADB] D:/appium_test/sdk/build-tools/22.0.1
[ADB] D:/appium_test/sdk/build-tools/21.1.2
[ADB] D:/appium_test/sdk/build-tools/20.0.0
[ADB] D:/appium_test/sdk/build-tools/19.1.0
[ADB] Using adb.exe from D:\appium_test\sdk\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: 127.0.0.1:21503
[debug] [ADB] Setting device id to 127.0.0.1:21503
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 22
[debug] [ADB] Device API level: 22
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Getting device platform version
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 5.1.1
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell wm size'
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell wm density'
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.product.model'
[debug] [ADB] Current device property 'ro.product.model': SM-G9350
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.product.manufacturer'
[debug] [ADB] Current device property 'ro.product.manufacturer': samsung
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop io.appium.uiautomator2.server'
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from D:\appium_test\sdk\build-tools\28.0.0\aapt.exe
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages io.appium.uiautomator2.server'
[debug] [ADB] App is installed
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages io.appium.uiautomator2.server.test'
[debug] [ADB] App is not installed
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys package io.appium.uiautomator2.server'
[debug] [UiAutomator2] Server installed but version 0.1.9 instead of 0.3.0. Re-installing
[debug] [ADB] Uninstalling io.appium.uiautomator2.server
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages io.appium.uiautomator2.server'
[debug] [ADB] App is installed
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop io.appium.uiautomator2.server'
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 uninstall io.appium.uiautomator2.server'
[debug] [ADB] 'adb uninstall io.appium.uiautomator2.server' command output: Success
[ADB] io.appium.uiautomator2.server was successfully uninstalled
[debug] [ADB] Uninstalling io.appium.uiautomator2.server.test
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages io.appium.uiautomator2.server.test'
[debug] [ADB] App is installed
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop io.appium.uiautomator2.server.test'
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 uninstall io.appium.uiautomator2.server.test'
[debug] [ADB] 'adb uninstall io.appium.uiautomator2.server.test' command output: Success
[ADB] io.appium.uiautomator2.server.test was successfully uninstalled
[debug] [ADB] Checking app cert for C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_appium-uiautomator2-driver@0.11.0@appium-uiautomator2-driver\uiautomator2\appium-uiautomator2-server-v0.3.0.apk
[ADB] Using apksigner.bat from D:\appium_test\sdk\build-tools\28.0.0\apksigner.bat
[debug] [ADB] Starting 'D:\appium_test\sdk\build-tools\28.0.0\apksigner.bat' with args '["verify","--print-certs","C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\_appium-uiautomator2-driver@0.11.0@appium-uiautomator2-driver\uiautomator2\appium-uiautomator2-server-v0.3.0.apk"]'
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] WARNING: META-INF/INDEX.LIST not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
[debug] [ADB] WARNING: META-INF/io.netty.versions.properties not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
[debug] [ADB]
[debug] [ADB] 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_appium-uiautomator2-driver@0.11.0@appium-uiautomator2-driver\uiautomator2\appium-uiautomator2-server-v0.3.0.apk' is already signed.
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[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
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop com.tal.kaoyan'
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 forward --remove tcp:8200'
[debug] [ADB] Running 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 forward --remove tcp:8200'
[UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command 'D:\appium_test\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 forward --remove tcp:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1''
[MJSONWP] Encountered internal error running command: TypeError: Cannot create property 'replace' on boolean 'true'
[MJSONWP] at ADB.callee$0$0$ (../../../lib/tools/apk-utils.js:367:20)
[MJSONWP] at tryCatch (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke as _invoke
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) as next
[MJSONWP] at invoke (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:136:37)
[MJSONWP] at enqueueResult (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:185:17)
[MJSONWP] at Promise.F (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_core-js@1.2.7@core-js\library\modules\$.export.js:30:36)
[MJSONWP] at AsyncIterator.enqueue (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:184:12)
[MJSONWP] at AsyncIterator.prototype.(anonymous function) as next
[MJSONWP] at Object.runtime.async (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:209:12)
[MJSONWP] at ADB.callee$0$0 as install
[MJSONWP] at UiAutomator2Server.signAndInstall$ (../../lib/uiautomator2.js:109:20)
[MJSONWP] at tryCatch (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke as _invoke
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) as next
[MJSONWP] at GeneratorFunctionPrototype.invoke (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 6872 ms - 187
[HTTP]