appium 启动 start session 的时候提示错误,求大神指点,刚刚接触 appium 卡在这一天了
Error
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 9bb17bf2 install C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk' exited with code 1'; Stderr: 'adb: failed to install C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]'; Code: '1'
{
"platformName": "Android",
"deviceName": "9bb17bf2",
"platformVersion": "8.0.0",
"appPackage": "com.woozoom.agrigcs",
"appActivity": "com.woozoom.agrigcs.activity.AGWelcomeActivity"
}
是不是手机上已经有 appium 相关的应用了,全部都卸载了再试试
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]'; Code: '1' 这个错误楼上说的 删除 appium 安装的 unlock_apk-debug.apk 应该 就没问题了
手机是安卓 8.0 的版本吗
我仔细看了一下,我俩的报错不一样,我的是这个:
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/zhangyang/Library/Android/sdk/platform-tools/adb -P 5037 -s 95d2e08b shell pm clear com.lianjia.home' exited with code 1'; Stderr: 'Error: java.lang.SecurityException: PID 11898 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.lianjia.home'; Code: '1'
Mac 上配置 appium 的 Desired Capabilities 点 start session 就提示这个,
版本问题,先卸载,再安装,adb uninstall io.appium.android.ime;adb uninstall io.appium.unlock;adb uninstall io.appium.settings
谁指点下 这个是为什么
这个问题解决了吗,我 adb uninstall io.appium.settings 后报错
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: io.appium.settings
at com.android.server.pm.Settings.isOrphaned(Settings.java:4429)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:21974)
at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:18991)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:913)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:912)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:134)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:22281)
at android.os.Binder.shellCommand(Binder.java:576)
at android.os.Binder.onTransact(Binder.java:476)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2657)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3658)
at android.os.Binder.execTransact(Binder.java:677)
怎么解决的?遇到同样问题了
我也出现了这个问题,让人没想到的是……我当时是同时开了模拟器,也在电脑上插了手机充电,把手机拔掉只用模拟器就好了,可能是多设备他识别出错?
报错大致如下
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command adb.exe[adb 的安装路径]' -P 5037 -s da52d8410704 shell pm install -g /data/local/tmp/appium_cache/3d97225b036c28750562ef8962defee6b1af19a4.apk' exited with code 1'; Stderr: 'Error: java.lang.SecurityException: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS permission to use the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS flag'; Code: '1'
先删除之前已经安装 的 APP,再运行程序安装 看看。