Cant run automation test

Hi, I have this error message while trying run the APP ( for android appium)

APPIUM verstion 1.6.5

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\gilb\AppData\Local\Android\sdk\platform-tools\adb.exe -P 5037 -s ZY2246WFXV install C:\Users\gilb\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk’ exited with code 1’; Stderr: ‘Failed to install C:\Users\gilb\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package io.appium.unlock signatures do not match the previously installed version; ignoring!]’; Code: ‘1’ (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 6.37 seconds

Thanks for your help

I am not entirely sure if I understood your problem correctly. But one high level look at your query makes me suspect that you might be having a different version of the app already installed in the device. Please check if it is installed already and if yes , uninstalling the app will help

@gilb uninstall “unlock” appium program from phone and try again.

Thanks for your answer !

I Uninstall the 'Unlock" app and run the automation again. i have the same error message.
I found that the “Unlock” APP was install again. why ? Who is responsible for installing this app?

This class ?

private static DesiredCapabilities getCaps(String deviceID){
    MyLogger.log.info("Creating driver caps for device: " + deviceID);
    DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability(MobileCapabilityType.DEVICE_NAME, deviceID);
        caps.setCapability(MobileCapabilityType.UDID , deviceID);
        caps.setCapability(MobileCapabilityType.PLATFORM_NAME , "Android");
        caps.setCapability(MobileCapabilityType.APP , "C://Users/gilb/AppData/Local/Programs/appium-desktop/resources/app/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk");
    return caps;
}

This is the error message :

[ADB] Cannot read version codes of C:\Users\gilb\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk and/or io.appium.settings. Assuming correct app version is already installed
[ADB] Error: io.appium.unlock.Unlock or io.appium.unlock.io.appium.unlock.Unlock never started
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at ADB.callee$0$0$ (…/…/…/lib/tools/apk-utils.js:153:7)
at tryCatch (C:\Users\gilb\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\gilb\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 next] (C:\Users\gilb\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\gilb\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
Error: io.appium.unlock.Unlock or io.appium.unlock.io.appium.unlock.Unlock never started

@gilb why you trying to test appium unlock app?

I dont need to do it ?

@gilb well unlock app itself is part of appium. Try better apiDemos.apk for testing which is a test apk.

[quote=“Aleksei, post:7, topic:18431”]
apiDemos.ap
[/quo[

question, i have also in other computer appium 1.4.2 and its working good with this class :

caps.setCapability(MobileCapabilityType.APP , “C://Users/gilb/AppData/Local/Programs/appium-
desktop/resources/app/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk”);
return caps;

now i try to create new workspace (in new computer) with appium 1.6.5. i copy the same project (i use Inteljent)
and its not working. the error message a show you before.

what can i write in : caps.setCapability(MobileCapabilityType.APP ?

I install my test app later with adb command so i dont now what to do here (in getCaps calss)

Thanks !!

@gilb just same as before. to make it more clear. this is how constants pointing to. e.g. “MobileCapabilityType.APP” actually = “app”.

public interface MobileCapabilityType extends CapabilityType {
    String AUTOMATION_NAME = "automationName";
    String PLATFORM_NAME = "platformName";
    String PLATFORM_VERSION = "platformVersion";
    String DEVICE_NAME = "deviceName";
    String NEW_COMMAND_TIMEOUT = "newCommandTimeout";
    String APP = "app";
    String BROWSER_NAME = "browserName";
    String UDID = "udid";
    String APPIUM_VERSION = "appiumVersion";
    String LANGUAGE = "language";
    String LOCALE = "locale";
    String ORIENTATION = "orientation";
    String AUTO_WEBVIEW = "autoWebview";
    String NO_RESET = "noReset";
    String FULL_RESET = "fullReset";
    String CLEAR_SYSTEM_FILES = "clearSystemFiles";
    String EVENT_TIMINGS = "eventTimings";
}

its work !!! with apiDemos.apk (as you wrote) or “app”

YOU ARE THE MAN !!!

Thanks :slight_smile: