Settings_apk-debug.apk and unlock_apk-debug.apk fail to install

I am trying to test an Android app with Appium (version 1.5.3) and the Android emulator, but each time I run my test script, Appium is unable to install either settings_apk-debug.apk or unlock_apk-debug.apk. I have tried using the Android emulator with OS versions 4.4.2 (API level 19), 5.0 (API level 20), 5.0.1 (API level 21) and 5.1.1 (API level 22) - NONE OF THEM WORK. Below, you can see the 2 commands (from Appium logs) which Appium keeps getting stuck at:

[debug] [ADB] Running /Users/ysxb111/Library/Android/sdk/platform-tools/adb with args: ["-P",5037,"-s",“192.168.56.101:5555”,“install”,"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/node_modules/io.appium.settings/bin/settings_apk-debug.apk"]

[debug] [ADB] Running /Users/ysxb111/Library/Android/sdk/platform-tools/adb with args: ["-P",5037,"-s",“192.168.56.101:5555”,“install”,"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/node_modules/appium-unlock/bin/unlock_apk-debug.apk"]

Please do let me know if there is any way to fix this problem. I have been trying to resolve this for over a week, and would sincerely appreciate your guidance ASAP!

What’s the error reported in the server log? Without that, I can only guess what the problem is.

Try uninstalling the two apps before you run your automation

adb uninstall io.appium.settings
adb uninstall io.appium.unlock

If that fixes the problem, you have a workaround. Failing that, I’ll await the error messages from the server log.

1 Like

Already tried doing that, but it doesn’t fix the problem :frowning: Literally got stuck on the same command again:

[debug] [AndroidDriver] Pushing settings apk to device…

[debug] [ADB] Running /Users/ysxb111/Library/Android/sdk/platform-tools/adb with args: ["-P",5037,"-s",“emulator-5554”,“install”,"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/node_modules/io.appium.settings/bin/settings_apk-debug.apk"]

It gets stuck at the above command so there is no error message after that command in the Appium logs :confused:

What happens when you run the command manually?

/Users/ysxb111/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/node_modules/io.appium.settings/bin/settings_apk-debug.apk

Is there are reason you are using a non-default port for Appium, i.e. 4723?

Hi All,

Can someone please help to resolve this error.?

An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘/Users/user1/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8M33VNBVK install /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk’ exited with code 1’; Stderr: ‘adb: failed to install /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]’; Code: ‘1’