问题
[MJSONWP] Encountered internal error running command: Error: Error finding if app is installed. Original error: Error executing adbExec. Original error: 'Command ''D:\\Program Files (x86)\\android-sdk-windows\\platform-tools\\adb.exe' -P 5037 -s R5CW52575HP shell pm list packages io.appium.uiautomator2.server' exited with code 255'; Stderr: 'Exception occurred while executing 'list':
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:14932 android.app.ActivityManager.handleIncomingUser:4802 com.android.server.pm.PackageManagerShellCommand.translateUserId:3510
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2672)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14932)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4802)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3510)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:969)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:865)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:724)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:226)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7071)
at android.os.Binder.shellCommand(Binder.java:1085)
at android.os.Binder.onTransact(Binder.java:903)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4962)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7055)
at android.os.Binder.execTransactInternal(Binder.java:1321)
at android.os.Binder.execTransact(Binder.java:1280)'; Code: '255'
at Object.wrappedLogger.errorAndThrow (C:\Users\liushan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
at ADB.callee$0$0$ (C:\Users\liushan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:28:9)
at tryCatch (C:\Users\liushan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\liushan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\liushan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\liushan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 2257 ms - 2291
报错信息
环境
解决啦,把三星手机里边的安全文件夹卸载了 可以正常运行