问答 appium-inspect 启动失败,请教大佬

Hypsius · 2023年12月22日 · 最后由 Hypsius 回复于 2023年12月25日 · 4109 次阅读

我使用的是模拟器,并连接了 devices,启动的时候报错了这个命令。

[ADB] Found 0 'build-tools' folders under 'D:\Program Files\platform-tools\' (newest first):
[ADB] Using 'adb.exe' from 'D:\Program Files\platform-tools\adb.exe'
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 start-server'
[AndroidDriver] Retrieving device list
[ADB] Trying to find connected Android devices
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"127.0.0.1:7555","state":"device"}]
[AndroidDriver] Looking for a device with Android '12.0.0'
[ADB] Setting device id to 127.0.0.1:7555
[ADB] Getting device platform version
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 12
[AndroidDriver] Using device: 127.0.0.1:7555
[ADB] Using 'adb.exe' from 'D:\Program Files\platform-tools\adb.exe'
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 start-server'
[ADB] Setting device id to 127.0.0.1:7555
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 32
[ADB] Getting device platform version
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 12
[ADB] Device API level: 32
[AndroidUiautomator2Driver@d95b (5aa73b08)] Relaxing hidden api policy
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package io.appium.settings'
[ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('5.2.0' >= '5.2.0')
[ADB] There is no need to install/upgrade 'C:\Users\gientech\.appium\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'pgrep --help; echo $?''
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell appops set io.appium.settings android:mock_location allow'
[AndroidDriver] Unable to set mock location for app 'io.appium.settings': Error executing adbExec. Original error: 'Command ''D:\\Program Files\\platform-tools\\adb.exe' -P 5037 -s 127.0.0.1\:7555 shell appops set io.appium.settings android\:mock_location allow' exited with code 127'; Command output: /system/bin/sh: appops: inaccessible or not found
[AndroidDriver]
[Logcat] Starting logs capture with command: 'D:\\Program Files\\platform-tools\\adb.exe' -P 5037 -s 127.0.0.1\:7555 logcat -v threadtime
[AndroidDriver] The 'unicodeKeyboard' capability has been deprecated and will be removed. Set the 'hideKeyboard' capability to 'true' in order to make the on-screen keyboard invisible.
[AndroidDriver] Enabling Unicode keyboard support
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell settings get secure default_input_method'
[AndroidDriver] Unsetting previous IME com.netease.nemu_vinput.nemu/com.android.inputmethodcommon.SoftKeyboard
[AndroidDriver] Setting IME to 'io.appium.settings/.UnicodeIME'
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell ime enable io.appium.settings/.UnicodeIME'
[AndroidUiautomator2Driver@d95b (5aa73b08)] Deleting UiAutomator2 session
[AndroidUiautomator2Driver@d95b (5aa73b08)] Unable to stop ChromeDriver proxies: Cannot read properties of undefined (reading 'proxyReqRes')
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys activity services io.appium.settings/.recorder.RecorderService'
[Logcat] Stopping logcat capture
[AndroidUiautomator2Driver@d95b (5aa73b08)] Restoring hidden api policy to the device default configuration
[ADB] Running 'D:\Program Files\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[AppiumDriver@b0e2] Event 'newSessionStarted' logged at 1703243729731 (19:15:29 GMT+0800 (中国标准时间))
[AppiumDriver@b0e2] Encountered internal error running command: Error executing adbExec. Original error: 'Command ''D:\\Program Files\\platform-tools\\adb.exe' -P 5037 -s 127.0.0.1\:7555 shell ime enable io.appium.settings/.UnicodeIME' exited with code 127'; Command output: /system/bin/sh: ime: inaccessible or not found
[AppiumDriver@b0e2]
[AppiumDriver@b0e2] Error: Command ''D:\\Program Files\\platform-tools\\adb.exe' -P 5037 -s 127.0.0.1\:7555 shell ime enable io.appium.settings/.UnicodeIME' exited with code 127
[AppiumDriver@b0e2]     at ChildProcess.<anonymous> (C:\Users\gientech\.appium\node_modules\appium-uiautomator2-driver\node_modules\teen_process\lib\exec.js:128:19)
[AppiumDriver@b0e2]     at ChildProcess.emit (node:events:514:28)
[AppiumDriver@b0e2]     at maybeClose (node:internal/child_process:1105:16)
[AppiumDriver@b0e2]     at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
[HTTP] <-- POST /session 500 744 ms - 1108
最佳回复

[AppiumDriver@b0e2] Encountered internal error running command: Error executing adbExec. Original error: 'Command ''D:\Program Files\platform-tools\adb.exe' -P 5037 -s 127.0.0.1:7555 shell ime enable io.appium.settings/.UnicodeIME' exited with code 127'; Command output: /system/bin/sh: ime: inaccessible or not found

参考下:https://blog.csdn.net/u010844189/article/details/80609164

共收到 4 条回复 时间 点赞

[AppiumDriver@b0e2] Encountered internal error running command: Error executing adbExec. Original error: 'Command ''D:\Program Files\platform-tools\adb.exe' -P 5037 -s 127.0.0.1:7555 shell ime enable io.appium.settings/.UnicodeIME' exited with code 127'; Command output: /system/bin/sh: ime: inaccessible or not found

参考下:https://blog.csdn.net/u010844189/article/details/80609164

是不是你本地的 adb 和模拟器的 adb 冲突了

Hypsius 关闭了讨论 12月25日 09:49
Hypsius 重新开启了讨论 12月25日 09:49
测试新人 回复

删掉了 unicodeKeyboard 就好了,这个好像已经不能用了😂 ,感谢回复

恒温 回复

感谢大佬的解答

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