Unable to run my script getting error in (install prase inconsistet certificates)

error: Failed to start an Appium session, err was: Error: Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk

Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
info: [debug] Error: Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk

Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
at C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1358:17
at [object Object]. (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk\r\r\nFailure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES])”,“origValue”:“Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk\r\r\nFailure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]”},“sessionId”:null}
info: ← POST /wd/hub/session 500 28722.724 ms - 406

Hey there
I believe you need to uninstall the previous version of the apk then reinstall (adb uninstall my.apk). As a pre processor directive, I usually do this before starting things up

1 Like

I already Uninstalled previous apk and apps but still showing same error

Hmm…something’s not adding up then. If you can provide these below that would help

  1. A gist of your appium logs Using github’s gist feature for easier reading
  2. Your current desired capabilities.
  3. A brief description of how you start your session. Are you doing any tasks before starting appium.

Thanks in advance!

am still facing prblm plz help me

capabilities.setCapability(“platformVERSION”, “4.4.2”);
System.out.println(“test1”);
capabilities.setCapability(“platformName”, “Android”);
// capabilities.setCapability(“noSign”, true);
System.out.println(“test1”);
capabilities.setCapability(“appPackage”, “com.skopic.android.india.skopicapp”);
System.out.println(“test1”);// my case com.gorillalogic.monkeytalk.demo1//my case com.gorillalogic.monkeytalk.demo1
capabilities.setCapability(“appActivity”, “com.skopic.android.skopicapp.LandingActivity”); //my case RootActivity
//capabilities.setCapability(“appPackage”, “com.amazon.kindle”);
System.out.println(“test1”);// my case com.gorillalogic.monkeytalk.demo1
//capabilities.setCapability(“appActivity”, “com.amazon.kcp.library.StandaloneLibraryActivity”);
System.out.println(“test2”);// my case RootActivity
// obj = new RemoteWebDriver(new URL(“http://127.0.0.1:4723/wd/hub”),
// capabilities);
URL u = new URL(“http://127.0.0.1:4723/wd/hub”);
System.out.println(“test3”);
AndroidDriver obj = new AndroidDriver(u, capabilities);

above mentioned is my code

below mentioned is my appium error

warn: Installing remote apk failed, going to uninstall and try again
info: [debug] Removing any old apks
info: [debug] executing cmd: B:\sdk\platform-tools\adb.exe -s 4100db1b50435000 shell “ls /data/local/tmp/*.apk”
info: [debug] executing cmd: B:\sdk\platform-tools\adb.exe -s 4100db1b50435000 shell rm “/data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk”
info: [debug] executing cmd: B:\sdk\platform-tools\adb.exe -s 4100db1b50435000 push “B:\sdk\platform-tools\com.skopic.android.skopicapp-4.apk” /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk
info: [debug] Attempting to install again for the last time
info: [debug] executing cmd: B:\sdk\platform-tools\adb.exe -s 4100db1b50435000 shell “pm install -r /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
warn: UiAutomator did not shut down fast enough, calling it gone
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk

Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
info: [debug] Error: Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk

Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
at C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1358:17
at [object Object]. (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk\r\r\nFailure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES])”,“origValue”:“Remote install failed: pkg: /data/local/tmp/398cf6e72d484521c5204c6502ec5245.apk\r\r\nFailure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]”},“sessionId”:null}
info: ← POST /wd/hub/session 500 28755.401 ms - 406

thanks for ur rply its working, i just chage app package name as shown in appium

1 Like

Got the same error. It worked for me after installing a previously appium version via npm. try npm uninstall -g appium. And then npm install -g [email protected]