51Testing软件测试论坛
标题:
appium setCapability (MobileCapabilityType.AUTOMATION_NAME, AutomationName.AN...
[打印本页]
作者:
测试积点老人
时间:
2019-9-2 10:47
标题:
appium setCapability (MobileCapabilityType.AUTOMATION_NAME, AutomationName.AN...
appium setCapability (MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2) 命令行报错
扒了很久网站信息未得到解决,未设置ui2属性情况下,命令行启动server,脚本运行正常,而且很奇怪的是在桌面ui版appium-server下设置UI2属性是运行正常的
具体报错日志如下,有没有朋友也遇到过相同的坑? 目前排查跟zipalign.exe这个工具无关:
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","getpro
p","ro.product.model"]
[debug] [ADB] Current device property 'ro.product.model': Google Nexus 5X - 6.0.
0 - API 23 - 1080x1920
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","getpro
p","ro.product.manufacturer"]
[debug] [ADB] Current device property 'ro.product.manufacturer': Genymotion
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","am","f
orce-stop","io.appium.uiautomator2.server"]
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-
tools\27.0.3\aapt.exe
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","pm","l
ist","packages","io.appium.uiautomator2.server"]
[debug] [ADB] App is installed
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","pm","l
ist","packages","io.appium.uiautomator2.server.test"]
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.uiautomator2.server
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","dumpsy
s","package","io.appium.uiautomator2.server"]
[debug] [UiAutomator2] Waiting up to 20000ms for instrumentation 'io.appium.uiau
tomator2.server.test/android.support.test.runner.AndroidJUnitRunner' to be avail
able
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","pm","l
ist","instrumentation"]
[debug] [UiAutomator2] Instrumentation 'io.appium.uiautomator2.server.test/andro
id.support.test.runner.AndroidJUnitRunner' available
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","wait-for-devic
e"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","echo",
"ping"]
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","pm","l
ist","packages","io.appium.settings"]
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.settings
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","dumpsy
s","package","io.appium.settings"]
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-
tools\27.0.3\aapt.exe
[debug] [ADB] The installed 'io.appium.settings' package does not require upgrad
e ('2.3.0' >= '2.3.0')
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","ps"]
[debug] [AndroidDriver] io.appium.settings is already running. There is no need
to reset its permissions.
[debug] [ADB] Device API level: 23
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","appops
","set","io.appium.settings","android:mock_location","allow"]
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'null' and country: 'null'
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Enabling Unicode keyboard support
[debug] [AndroidDriver] Pushing unicode ime to device...
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","install","C:\\
Users\\samfu.KAISER\\AppData\\Roaming\\npm\\node_modules\\appium\\node_modules\\
_appium-android-ime@2.0.0@appium-android-ime\\bin\\UnicodeIME-debug.apk"]
[debug] [ADB] Install command stdout: [100%] /data/local/tmp/UnicodeIME-debug.ap
k
C:\Users\samfu.KAISER\AppData\Roaming\npm\node_modules\appium\node_modules\_appi
um-android-ime@2.0.0@appi...deIME-debug.apk: 1 file pushed. 0.5 MB/s (36795 byte
s in 0.065s)
pkg: /data/local/tmp/UnicodeIME-debug.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
[debug] [ADB] Application 'C:\Users\samfu.KAISER\AppData\Roaming\npm\node_module
s\appium\node_modules\_appium-android-ime@2.0.0@appium-android-ime\bin\UnicodeIM
E-debug.apk' already installed. Continuing.
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","settin
gs","get","secure","default_input_method"]
[debug] [AndroidDriver] Unsetting previous IME com.android.inputmethod.latin/.La
tinIME
[debug] [AndroidDriver] Setting IME to 'io.appium.android.ime/.UnicodeIME'
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","ime","
enable","io.appium.android.ime/.UnicodeIME"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","ime","
set","io.appium.android.ime/.UnicodeIME"]
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","pm","l
ist","packages","io.appium.unlock"]
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.unlock
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","dumpsy
s","package","io.appium.unlock"]
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-
tools\27.0.3\aapt.exe
[debug] [ADB] The installed 'io.appium.unlock' package does not require upgrade
('2.0.0' >= '2.0.0')
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","forward","tcp:
8200","tcp:6790"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","dumpsy
s","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [AndroidDriver] Extracting strings from apk C:\Users\samfu.KAISER\IdeaPr
ojects\apptest\apps\ContactManager.apk null C:\Users\SAMFU~1.KAI\AppData\Local\T
emp\com.example.android.contactmanager
[debug] [ADB] Extracting strings for language: default
[debug] [ADB] Device API level: 23
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","getpro
p","persist.sys.locale"]
[debug] [ADB] Current device property 'persist.sys.locale':
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","getpro
p","ro.product.locale"]
[debug] [ADB] Current device property 'ro.product.locale': en-US
[debug] [ADB] No strings.xml for language 'en', getting default strings.xml
[debug] [ADB] Reading strings from converted strings.json
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","push","C:\\Use
rs\\SAMFU~1.KAI\\AppData\\Local\\Temp\\com.example.android.contactmanager\\strin
gs.json","/data/local/tmp"]
[debug] [ADB] Checking app cert for C:\Users\samfu.KAISER\IdeaProjects\apptest\a
pps\ContactManager.apk
[ADB] Using apksigner.bat from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\b
uild-tools\27.0.3\apksigner.bat
[ADB] Using apksigner.bat from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\b
uild-tools\27.0.3\apksigner.bat
[debug] [ADB] Patching 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-to
ols\27.0.3\apksigner.bat' for Windows...
[debug] [ADB] Starting patched 'C:\Users\SAMFU~1.KAI\AppData\Local\Temp\201821-8
736-yhnhf.c2sbjg\apksigner.bat' with args 'verify,C:\Users\samfu.KAISER\IdeaProj
ects\apptest\apps\ContactManager.apk'
[debug] [ADB] 'C:\Users\samfu.KAISER\IdeaProjects\apptest\apps\ContactManager.ap
k' is already signed.
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error
was: Error: Trying to proxy a session command without session id
[debug] [UiAutomator2] Resetting IME to 'com.android.inputmethod.latin/.LatinIME
'
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","ime","
set","com.android.inputmethod.latin/.LatinIME"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","shell","am","f
orce-stop","com.example.android.contactmanager"]
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\platform-
tools\adb.exe' with args: ["-P",5037,"-s","192.168.198.101:5555","forward","--re
move","tcp:8200"]
[MJSONWP] Encountered internal error running command: TypeError: helpers.install
ApkRemotely is not a function
at AndroidUiautomator2Driver.initAUT$ (../../lib/driver.js:387:21)
at tryCatch (C:\Users\samfu.KAISER\AppData\Roaming\npm\node_modules\appium\n
ode_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\samfu.KAISER\App
Data\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-ru
ntime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\U
sers\samfu.KAISER\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-ru
ntime@5.8.24@babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\samfu.KAISER\AppData\Roaming\
npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regener
ator\runtime.js:136:37)
at <anonymous>
[HTTP] <-- POST /wd/hub/session 500 7712 ms - 181
复制代码
作者:
qqq911
时间:
2019-9-3 10:46
没遇到过
作者:
jingzizx
时间:
2019-9-3 12:02
帮顶
作者:
litingting0214
时间:
2019-9-3 15:14
没有
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2