Appium appium+python 运行时报错:UiAutomator exited unexpectedly with code 4294967295, signal null,一直停住不动,appium 报错 log 如下去,请大神讲解下 appium-desktop 的版本是 1.5

daxuefei · 2018年05月11日 · 最后由 testwangzheng 回复于 2019年09月18日 · 3548 次阅读

Appium] Merged W3C capabilities {"firstMatch":[{}],"alwaysMatch":{"platformName... into desiredCapabilities object {"deviceName":"712QKCS32CD6T","unicodeKeyboard"...
[Appium] Creating new AndroidDriver (v1.37.0) session
[Appium] Capabilities:
[Appium] deviceName: 712QKCS32CD6T
[Appium] unicodeKeyboard: true
[Appium] platformVersion: 7.0
[Appium] appActivity: com.metroapp.MainActivity
[Appium] platformName: Android
[Appium] resetKeyboard: true
[Appium] appPackage: com.douwan.peacemetro
[Appium] noReset: true
[Appium] newCommandTimeout: 6000
[BaseDriver] Session created with session id: 1f52372c-0b39-4008-87b2-74f53259f6a2
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_77
[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] Looking for a device with Android '7.0'
[ADB] Setting device id to 712QKCS32CD6T
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 7.0
[AndroidDriver] Using device: 712QKCS32CD6T
[ADB] Checking whether adb is present
[ADB] Setting device id to 712QKCS32CD6T
[AndroidDriver] App file was not listed, instead we're going to run com.douwan.peacemetro directly on the device
[AndroidDriver] Checking whether package is present on the device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","pm","list","packages","com.douwan.peacemetro"]
[AndroidDriver] Starting Android session
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","wait-for-device"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","echo","ping"]
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'undefined' and country: 'undefined'
[Logcat] Starting logcat capture
[AndroidDriver] Enabling Unicode keyboard support
[AndroidDriver] Pushing unicode ime to device...
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","install","C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\appium-android-ime\bin\UnicodeIME-debug.apk"]
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","install","C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\appium-android-ime\bin\UnicodeIME-debug.apk"]
[ADB] Application 'C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\appium-android-ime\bin\UnicodeIME-debug.apk' already installed. Continuing.
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","settings","get","secure","default_input_method"]
[AndroidDriver] Unsetting previous IME io.appium.android.ime/.UnicodeIME
[AndroidDriver] Setting IME to 'io.appium.android.ime/.UnicodeIME'
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","ime","enable","io.appium.android.ime/.UnicodeIME"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","ime","set","io.appium.android.ime/.UnicodeIME"]
[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-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","pm","list","packages","io.appium.settings"]
[ADB] App is installed
[ADB] Getting package info for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","dumpsys","package","io.appium.settings"]
[ADB] Checking whether aapt is present
[ADB] The installed 'io.appium.settings' package does not require upgrade (5 >= 5)
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","getprop","ro.build.version.sdk"]
[ADB] Current device property 'ro.build.version.sdk': 24
[ADB] Device API level: 24
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","dumpsys","package","io.appium.settings"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","pm","dump","io.appium.settings"]
[ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"]
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","ps"]
[ADB] Device API level: 24
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","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-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","pm","list","packages","io.appium.unlock"]
[ADB] App is installed
[ADB] Getting package info for io.appium.unlock
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","dumpsys","package","io.appium.unlock"]
[ADB] Checking whether aapt is present
[ADB] The installed 'io.appium.unlock' package does not require upgrade (2 >= 2)
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 7.0
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","wm","size"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","getprop","ro.product.model"]
[ADB] Current device property 'ro.product.model': Meizu S6
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","getprop","ro.product.manufacturer"]
[ADB] Current device property 'ro.product.manufacturer': Meizu
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] No app capability. Assuming it is already on the device
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","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-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","push","C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\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-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","ps"]
[ADB] Attempting to kill process 16716
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","kill","-0",16716]
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe' with args: ["-P",5037,"-s","712QKCS32CD6T","shell","kill","-0",16716]
[ADB] Error: Unable to kill uiautomator processes. Original error: Error executing adbExec. Original error: 'Command 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 712QKCS32CD6T shell kill -0 16716' exited with code 1'; Stderr: '/system/bin/sh: kill: 16716: Operation not permitted'; Code: '1'
at Object.wrappedLogger.errorAndThrow (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13)
at ADB.callee$0$0$ (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\adb-commands.js:1057:9)
at tryCatch (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as throw
at GeneratorFunctionPrototype.invoke (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at
Error: Unable to kill uiautomator processes. Original error: Error executing adbExec. Original error: 'Command 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 712QKCS32CD6T shell kill -0 16716' exited with code 1'; Stderr: '/system/bin/sh: kill: 16716: Operation not permitted'; Code: '1'
at Object.wrappedLogger.errorAndThrow (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13)
at ADB.callee$0$0$ (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\adb-commands.js:1057:9)
at tryCatch (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as throw
at GeneratorFunctionPrototype.invoke (C:\Users\Administrator\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at
[UiAutomator] Error while killing uiAutomator: Error: Unable to kill uiautomator processes. Original error: Error executing adbExec. Original error: 'Command 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 712QKCS32CD6T shell kill -0 16716' exited with code 1'; Stderr: '/system/bin/sh: kill: 16716: Operation not permitted'; Code: '1'
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","712QKCS32CD6T","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.douwan.peacemetro","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[UiAutomator] UiAutomator exited unexpectedly with code 4294967295, signal null
[UiAutomator] Moving to state 'stopped'
[HTTP] <-- POST /wd/hub/session - - ms - -

共收到 3 条回复 时间 点赞

python 的程序不结束,并且 appium 停在 signal null

解决方案:

使用 adb shell 进入手机

在 data/local/tmp 应该有一个 AppiumBootstrap.jar

可能你的名字是 AppiumBoots 或者 AppiumBootstrap.j。

使用 mv 你的文件 AppiumBootstrap.jar 命令解决

mv AppiumBoots AppiumBootstrap.jar

桃花幻梦 回复

留个足迹,adb shell 后直接 ls 看不到 data 的,直接 cd data/local/tmp 就能进去

zheng。手机安装了 atx 用 weditor 查看元素。然后 pycharm 脚本执行挂了,driver 没有退出。手机上 atx 关闭 uiaotumator 服务就好了

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