Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8665] Android: INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES when installing different app with same app id

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-10-19T01:19:10.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.2, Release 2.0.1, Release 3.0.1
Fix Version/s2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0
ComponentsAndroid, Tooling
Labelsandroidbuild, ay-verified, cb-verified, core, parity, qe-and040912, usability
ReporterDustin Hyde
AssigneeChris Barber
Created2012-04-10T16:26:53.000+0000
Updated2013-11-12T10:01:54.000+0000

Description

When an android app is installed, and that app is already installed using a different deploy type (i.e., production vs. testing), or a different app is installed with the same app id, there is an error INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES logged to the console. I would expect the script to fail with a meaningful error message (and Titanium Studio to have an error prompt if necessary) indicating an app with the same app id and a different certificate is already installed on device, remove this app to continue installation. Steps to Reproduce (Scenario 1): 1. Create a new Android project. 2. Distribute for production and install to device. 3. Deploy again to device from studio. Steps to Reproduce (Scenario 2): 1. Create a new Android project. 2. Install to device in development mode. 3. Create another Android project with the same app id. 4. Deploy second app to device. Expected Result: Script fails with meaningful error message, studio prompts error if necessary. Actual Result: Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES] logs to console, difficult to know exactly what the problem is.

Comments

  1. Dustin Hyde 2013-01-04

    This ticket may require Titanium Studio involvement.
  2. Allen Yeung 2013-10-18

    This is actually an issue with development builds having a different keystore than the one installed by a production build. In the new CLI, you can specify a keystore even in a device build. This can be resolved if they specify a keystore for all their builds.
  3. Allen Yeung 2013-10-19

    PR: https://github.com/appcelerator/titanium_mobile/pull/4781
  4. Priya Agarwal 2013-11-12

    Tested Environment: Appcelerator Studio: 3.2.0.201311112306 SDK:3.2.0.v20131111174605 alloy: 1.3.0 acs: 1.0.7 npm: 1.3.2 titanium: 3.2.0 titanium-code-processor: 1.0.3 Xcode:5.0.1 Device: Google nexus 7(v4.3) OS: Mac OSX 10.9 Not getting the INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES when installing different app with same app id. Tried for both the above mentioned Scenarios: Result for Scenario 1 was proper meaningful error message, studio prompts error as
       [ERROR] :  Failed to install apk on "058429ec"
       [ERROR] :  The app is already installed, but signed with a different certificate
       [ERROR] :  You need to either manually uninstall the app or rebuild using the same certificate that was used to sign the installed app
       
    Result for Scenario 2 was it overrides the app as app ids are same. Hence Closing as working as expected and not getting the above mentioned error.

JSON Source