Appium 求教:运行代码异常,UiAutomator exited unexpectedly with code 4294967295, signal null

wangchen_neuq · 2018年01月24日 · 最后由 JasonChang 回复于 2018年12月29日 · 1634 次阅读

环境:win7,Android8.0 真机,ADB 端口:7305

log 日志:
[Appium] Welcome to Appium v1.7.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"appActivity":"","app":"D:\work\appCrawler\appCrawler\com.ibox.calculators.apk","appPackage":"","appium":"http://127.0.0.1:4723/wd/hub,noReset:true,autoLaunch:true,platformName:Android,fullReset:false,deviceName:demo},requiredCapabilities:{},capabilities:{desiredCapabilities:{appActivity:,app:D:\\work\\appCrawler\\appCrawler\\com.ibox.calculators.apk,appPackage:,appium:http://127.0.0.1:4723/wd/hub,noReset:true,autoLaunch:true,platformName:Android,fullReset:false,deviceName:demo},requiredCapabilities:{},alwaysMatch:{platformName:Android},firstMatch:[]}"}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"","app":"D:\work\appCrawler\appCrawler\com.ibox.calculators.apk","appPackage":"","appium":"http://127.0.0.1:4723/wd/hub,noReset:true,autoLaunch:true,platformName:Android,fullReset:false,deviceName:demo},{},{desiredCapabilities:{appActivity:,app:D:\\work\\appCrawler\\appCrawler\\com.ibox.calculators.apk,appPackage:,appium:http://127.0.0.1:4723/wd/hub,noReset:true,autoLaunch:true,platformName:Android,fullReset:false,deviceName:demo},requiredCapabilities:{},alwaysMatch:{platformName:Android},firstMatch:[]}"]
[BaseDriver] Event 'newSessionRequested' logged at 1516787915015 (17:58:35 GMT+0800 (中国标准时间))
[Appium] Merged W3C capabilities {"desiredCapabilities":{"appActivity":"","app":... into desiredCapabilities object {"appActivity":"","app":"D:\work\appCrawler\...
[Appium] Creating new AndroidDriver (v1.37.0) session
[Appium] Capabilities:
[Appium] appActivity:
[Appium] app: D:\work\appCrawler\appCrawler\com.ibox.calculators.apk
[Appium] appPackage:
[Appium] appium: http://127.0.0.1:4723/wd/hub
[Appium] noReset: true
[Appium] autoLaunch: true
[Appium] platformName: Android
[Appium] fullReset: false
[Appium] deviceName: demo
[BaseDriver] Capability 'autoLaunch' changed from string to boolean. This may cause unexpected behavior
[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] The following capabilities were provided, but are not recognized by appium: appium.
[BaseDriver] Session created with session id: ad6fed48-4938-4cc1-8534-d9ad815a8071
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_144
[ADB] Checking whether adb is present
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[AndroidDriver] Using device: RTJ0116719000006
[ADB] Checking whether adb is present
[ADB] Setting device id to RTJ0116719000006
[BaseDriver] Using local app 'D:\work\appCrawler\appCrawler\com.ibox.calculators.apk'
[AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","wait-for-device"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","echo","ping"]
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'undefined' and country: 'undefined'
[Logcat] Starting logcat capture
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","pm","list","packages","io.appium.settings"]
[ADB] App is not installed
[ADB] App 'C:\Users\hWX507746\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk' not installed. Installing
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","install","C:\Users\hWX507746\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","getprop","ro.build.version.sdk"]
[ADB] Current device property 'ro.build.version.sdk': 26
[ADB] Device API level: 26
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","dumpsys","package","io.appium.settings"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","pm","dump","io.appium.settings"]
[ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.READ_PHONE_STATE,;,pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_FINE_LOCATION,;,pm,grant,io.appium.settings,android.permission.ACCESS_COARSE_LOCATION,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;,pm,grant,io.appium.settings,android.permission.SET_ANIMATION_SCALE,;,pm,grant,io.appium.settings,android.permission.CHANGE_CONFIGURATION,;
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","pm","grant","io.appium.settings","android.permission.READ_PHONE_STATE",";","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_FINE_LOCATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_COARSE_LOCATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";","pm","grant","io.appium.settings","android.permission.SET_ANIMATION_SCALE",";","pm","grant","io.appium.settings","android.permission.CHANGE_CONFIGURATION",";"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","ps"]
[ADB] Device API level: 26
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","am","start","-W","-n","io.appium.settings/.Settings","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[ADB] Device API level: 26
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[AndroidDriver] Pushing unlock helper app to device...
[ADB] Getting install status for io.appium.unlock
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","pm","list","packages","io.appium.unlock"]
[ADB] App is not installed
[ADB] App 'C:\Users\hWX507746\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk' not installed. Installing
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","install","C:\Users\hWX507746\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk"]
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 8.0.0
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","wm","size"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","getprop","ro.product.model"]
[ADB] Current device property 'ro.product.model': MHA-AL00
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","getprop","ro.product.manufacturer"]
[ADB] Current device property 'ro.product.manufacturer': HUAWEI
[AndroidDriver] Parsing package and activity from app manifest
[ADB] Checking whether aapt is present
[ADB] Extracting package and launch activity from manifest
[ADB] badging package: com.ibox.calculators
[ADB] badging act: com.ibox.calculators.SplashActivity
[AndroidDriver] Parsed package and activity are: com.ibox.calculators/com.ibox.calculators.SplashActivity
[AndroidDriver] Remote apk path is /data/local/tmp/049f97da71fe2366fc804fd866ecb932.apk
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","ls","/data/local/tmp/049f97da71fe2366fc804fd866ecb932.apk"]
[AndroidDriver] Checking if app is installed
[ADB] Getting install status for com.ibox.calculators
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","pm","list","packages","com.ibox.calculators"]
[ADB] App is not installed
[AndroidDriver] Apk is not yet installed
[AndroidDriver] installing apk from remote
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","mkdir","-p","/data/local/tmp"]
[AndroidDriver] Clearing out any existing remote apks with the same hash
[AndroidDriver] Removing any old apks
[AndroidDriver] Except ["049f97da71fe2366fc804fd866ecb932"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","ls","/data/local/tmp/*.apk"]
[ADB] Uninstalling com.ibox.calculators
[ADB] Getting install status for com.ibox.calculators
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","pm","list","packages","com.ibox.calculators"]
[ADB] App is not installed
[ADB] com.ibox.calculators was not uninstalled, because it was not present on the device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","pm","install","-r","/data/local/tmp/049f97da71fe2366fc804fd866ecb932.apk"]
[AndroidDriver] Extracting strings from apk D:\work\appCrawler\appCrawler\com.ibox.calculators.apk undefined C:\Users\HWX507~1\AppData\Local\Temp\com.ibox.calculators
[ADB] Extracting strings for language: default
[ADB] Device API level: 26
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","getprop","persist.sys.locale"]
[ADB] Current device property 'persist.sys.locale': en-US
[ADB] No strings.xml for language 'en', getting default strings.xml
[ADB] Reading strings from converted strings.json
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","push","C:\Users\HWX507~1\AppData\Local\Temp\com.ibox.calculators\strings.json","/data/local/tmp"]
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","forward","tcp:4724","tcp:4724"]
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state 'starting'
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","push","C:\Users\hWX507746\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-bootstrap\bootstrap\bin\AppiumBootstrap.jar","/data/local/tmp/"]
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Android\sdkforas\platform-tools\adb.exe' with args: ["-P",7305,"-s","RTJ0116719000006","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",7305,"-s","RTJ0116719000006","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.ibox.calculators","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[UiAutomator] UiAutomator exited unexpectedly with code 4294967295, signal null
[UiAutomator] Moving to state 'stopped'

共收到 4 条回复 时间 点赞
1楼 已删除
匿名 #2 · 2018年04月19日

我也遇到了

3楼 已删除

@nateby 具体是什么样的操作?我不太明白,请问能解释下吗?谢谢了

5楼 已删除

请问这个问题是怎么解决的呢?

我也遇到了,怎么解决呢

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册