Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12159

Android: Keystore password prompt won't show up

    XMLWordPrintableJSON

Details

    Description

      After updating platform to Android 6.0.0 keystore password prompt won't work anymore.
      This happens when doing release build with command

      cordova build --release --buildConfig build.json
      

      Where build.json contains keystore and alias properties.
      On previous version this showed a prompt that asked for keystore passwords.
      With new version build fails with an error because it won't have the correct passwords.

      Execution failed for task ':packageArmv7Release'.
      > com.android.ide.common.signing.KeytoolException: Failed to read key STORE from store "KEYSTORE": Keystore was tampered with, or password was incorrect
      

      I'm using Cordova 6.4.0 and have tested this with Android 5.1.1 and 5.2.2 and both of those work. Android 6.1.0 has the same issue.

      It seems to me that validateReleaseSigning task isn't being added to gradle tasks anymore for some reason, which means prompt won't be shown.
      I think this function is supposed to show the prompt

      platforms/android/build.gradle
      gradle.taskGraph.whenReady { taskGraph ->
          taskGraph.getAllTasks().each() { task ->
              if (task.name == 'validateReleaseSigning') {
                  promptForReleaseKeyPassword()
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              teemu_ Teemu Halmela
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: