[ 
https://issues.apache.org/jira/browse/CB-12159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15696306#comment-15696306
 ] 

Rodrigo commented on CB-12159:
------------------------------

I can confirm this issue.

After updating to cordova 6.4.0 and cordova-android 6.1.0 it no longer prompted 
for the password when running {code}cordova build android --release{code} and 
it fails with the following message:
{code}
* What went wrong:
Execution failed for task ':packageRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key 
> alias_name from store "PATH/my-release-key.keystore": Keystore was tampered 
> with, or password was incorrect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED

Total time: 11.371 secs
Error: PATH/platforms/android/gradlew: Command failed with exit code 1 Error 
output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':packageRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key 
> alias_name from store "PATH/my-release-key.keystore": Keystore was tampered 
> with, or password was incorrect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.
{code}

My build.json: 
{code:title=build.json}{
    "android": {
        "release": {
            "keystore": "my-release-key.keystore",
            "storePassword": "",
            "alias": "alias_name",
            "password": "",
            "keystoreType": ""
        }
    }
}
{code}

There's a fix (that I don't like): You can add the password on your build.json 
file.
If this is intentional I would like to say that this brings a huge security 
risk if for example your build.json file is on your VCS (e.g. git) ...

> Android: Keystore password prompt won't show up
> -----------------------------------------------
>
>                 Key: CB-12159
>                 URL: https://issues.apache.org/jira/browse/CB-12159
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Teemu Halmela
>              Labels: android, gradle, keystore, password, prompt
>
> After updating platform to Android 6.0.0 keystore password prompt won't work 
> anymore.
> This happens when doing release build with command
> {noformat}
> cordova build --release --buildConfig build.json
> {noformat}
> 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.
> {noformat}
> 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
> {noformat}
> 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 
> {code:javascript|title=platforms/android/build.gradle}
> gradle.taskGraph.whenReady { taskGraph ->
>     taskGraph.getAllTasks().each() { task ->
>         if (task.name == 'validateReleaseSigning') {
>             promptForReleaseKeyPassword()
>         }
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to