Appium Automatic Server 启动报错:An unknown server-side error occurred while processing the command. Original error: Error executing adbExec.
问题描述
使用appium客户端连接小米手机失败,完整报错信息如下:
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘{已隐藏}/Library/Android/sdk/platform-tools/adb -P 5037 -s fca2117a shell settings delete global hidden_api_policy_pre_p_apps’ exited with code 255’; Stderr: ‘Exception occurred while executing ‘delete’: java.lang.SecurityException: Permission denial, must have one of: [android.permission. WRITE_SECURE_SETTINGS] at com.android.providers.settings.SettingsProvider.enforceHasAtLeastOnePermission(SettingsProvider.java:2394) at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1494) at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1486) at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1457) at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:544) at android.content.ContentProvider.call(ContentProvider.java:2700) at android.content.ContentProviderTransport.call(ContentProvider.java:634) at com.android.providers.settings.SettingsServiceMyShellCommand.deleteForUser(SettingsService.java:408) at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:282) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50) at android.os.Binder.shellCommand(Binder.java:1075) at android.os.Binder.onTransact(Binder.java:895) at android.os.Binder.execTransactInternal(Binder.java:1351) at android.os.Binder.execTransact(Binder.java:1282)’; Code: ‘255’
原因分析:
Permission denial,应该是adb连接时没有权限的问题,最近更新了手机系统,不知道问题是不是出在这里,于是尝试从USB调试里面寻找某个开启开关。文章来源:https://www.toymoban.com/news/detail-852174.html
解决方案:
小米手机:打开USB调试后- 搜索栏搜索:USB调试(安全设置)
开启它。文章来源地址https://www.toymoban.com/news/detail-852174.html
到了这里,关于Appium如何解决报错:An unknown server-side error occurred while processing the command. Original error: Er的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!