.keystore error to release an android app - Keystore was tampered with, or password was incorrect


#1

Hi guys.

I’m running this command:

tns build android --release --key-store-path cert/cfenix-key.keystore --key-store-password MY_PASSWORD --key-store-alias cfenix-key --key-store-alias-password SAME_PASSWORD --copy-to fenixnoponto_0-0-7.apk

and unfortunately I’m getting this error:

Failed to read key cfenix-key from store “/Users/twan/Documents/wplex/workspace/fenixnoponto/cert/cfenix-key.keystore”: Keystore was tampered with, or password was incorrect

and the curious thing is when I execute this command

keytool -v -list -keystore cert/cfenix-key.keystore

and inform the SAME_PASSWORD I can read my .keystore file with the following data:

eystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: cfenix-key
Creation date: Dec 2, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Company Name, OU=Development, O=Company Name Ltda, L=Florianopolis, ST=SC, C=BR
Issuer: CN=Company Name, OU=Development, O=Company Name Ltda, L=Florianopolis, ST=SC, C=BR
Serial number: 789u87jfd8
Valid from: Fri Dec 02 18:54:03 BRST 2016 until: Tue Apr 19 17:54:03 BRT 2044

So, I concluded that I’m using the right password, my .keystore is not out of date and the file is not corrupted (I used sha1sum to check it and its fine). What am I doing wrong?

Thanks


#2

Here is the command I run, works every time when building release for publishing:

tns build android --release --key-store-path ./nastc.keystore --key-store-password MYPASSWORD --key-store-alias nastc --key-store-alias-password MYPASSWORD --copy-to ./nastc4.apk

Is your path piece correct? cert/... maybe specify root with ./cert/?


#3

Just a thought, if your password contains special characters you need to wrap it in single quotes ('). I had a similar problem in the past as my password contains an exclamation mark.

--key-store-password 'MY_PASSWORD!'


#4

Thank you @3rror404 It was exactly this. It’s SOLVED :slight_smile:


Error to release an app using webpack - Keystore was tampered with, or password was incorrect