appium setCapability (MobileCapabilityType.AUTOMATION_NAME, AutomationName.AN...
appium setCapability (MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2) 命令行报错扒了很久网站信息未得到解决,未设置ui2属性情况下,命令行启动server,脚本运行正常,而且很奇怪的是在桌面ui版appium-server下设置UI2属性是运行正常的具体报错日志如下,有没有朋友也遇到过相同的坑? 目前排查跟zipalign.exe这个工具无关:
1 device(s) connected
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"]
Current device property 'ro.product.model': Google Nexus 5X - 6.0.
0 - API 23 - 1080x1920
Getting connected devices...
1 device(s) connected
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"]
Current device property 'ro.product.manufacturer': Genymotion
Getting connected devices...
1 device(s) connected
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"]
Checking whether aapt is present
Using aapt.exe from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-
tools\27.0.3\aapt.exe
Getting install status for io.appium.uiautomator2.server
Getting connected devices...
1 device(s) connected
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"]
App is installed
Getting install status for io.appium.uiautomator2.server.test
Getting connected devices...
1 device(s) connected
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"]
App is installed
Getting package info for io.appium.uiautomator2.server
Getting connected devices...
1 device(s) connected
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"]
Waiting up to 20000ms for instrumentation 'io.appium.uiau
tomator2.server.test/android.support.test.runner.AndroidJUnitRunner' to be avail
able
Getting connected devices...
1 device(s) connected
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"]
Instrumentation 'io.appium.uiautomator2.server.test/andro
id.support.test.runner.AndroidJUnitRunner' available
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"]
Getting connected devices...
1 device(s) connected
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"]
Pushing settings apk to device...
Getting install status for io.appium.settings
Getting connected devices...
1 device(s) connected
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"]
App is installed
Getting package info for io.appium.settings
Getting connected devices...
1 device(s) connected
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"]
Checking whether aapt is present
Using aapt.exe from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-
tools\27.0.3\aapt.exe
The installed 'io.appium.settings' package does not require upgrad
e ('2.3.0' >= '2.3.0')
Getting connected devices...
1 device(s) connected
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"]
io.appium.settings is already running. There is no need
to reset its permissions.
Device API level: 23
Getting connected devices...
1 device(s) connected
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"]
setDeviceLanguageCountry requires language or country.
Got language: 'null' and country: 'null'
Starting logcat capture
Enabling Unicode keyboard support
Pushing unicode ime to device...
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"]
Install command stdout: /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
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.
Getting connected devices...
1 device(s) connected
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"]
Unsetting previous IME com.android.inputmethod.latin/.La
tinIME
Setting IME to 'io.appium.android.ime/.UnicodeIME'
Getting connected devices...
1 device(s) connected
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"]
Getting connected devices...
1 device(s) connected
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"]
Pushing unlock helper app to device...
Getting install status for io.appium.unlock
Getting connected devices...
1 device(s) connected
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"]
App is installed
Getting package info for io.appium.unlock
Getting connected devices...
1 device(s) connected
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"]
Checking whether aapt is present
Using aapt.exe from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-
tools\27.0.3\aapt.exe
The installed 'io.appium.unlock' package does not require upgrade
('2.0.0' >= '2.0.0')
Forwarding UiAutomator2 Server port 6790 to 8200
Forwarding system: 8200 to device: 6790
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"]
Getting connected devices...
1 device(s) connected
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"]
Screen already unlocked, doing nothing
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
Extracting strings for language: default
Device API level: 23
Getting connected devices...
1 device(s) connected
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"]
Current device property 'persist.sys.locale':
Getting connected devices...
1 device(s) connected
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"]
Current device property 'ro.product.locale': en-US
No strings.xml for language 'en', getting default strings.xml
Reading strings from converted strings.json
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"]
Checking app cert for C:\Users\samfu.KAISER\IdeaProjects\apptest\a
pps\ContactManager.apk
Using apksigner.bat from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\b
uild-tools\27.0.3\apksigner.bat
Using apksigner.bat from C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\b
uild-tools\27.0.3\apksigner.bat
Patching 'C:\Users\samfu.KAISER\AppData\Local\Android\Sdk\build-to
ols\27.0.3\apksigner.bat' for Windows...
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'
'C:\Users\samfu.KAISER\IdeaProjects\apptest\apps\ContactManager.ap
k' is already signed.
Deleting UiAutomator2 session
Deleting UiAutomator2 server session
Did not get confirmation UiAutomator2 deleteSession worked; Error
was: Error: Trying to proxy a session command without session id
Resetting IME to 'com.android.inputmethod.latin/.LatinIME
'
Getting connected devices...
1 device(s) connected
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"]
Getting connected devices...
1 device(s) connected
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"]
Stopping logcat capture
Removing forwarded port socket connection: 8200
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"]
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 (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) (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>
<-- POST /wd/hub/session 500 7712 ms - 181
没遇到过 帮顶 没有
页:
[1]