bundle-signer
bundle-signer copied to clipboard
Invalid keystore format.
I'm trying to generate bin file using the command mentioned in readme file.
java -jar app/bundlesigner-0.1.13.jar genbin -v --bundle app/bazaar/release/app-bazaar-release.aab --bin . --v2-signing-enabled true --v3-signing-enabled false --ks ../release.jks
But I'm getting the following error that says the keystore file is invalid. I don't know how it's invalid, cause I was able to generate bin file a month ago and there was nor problem at all.
Picked up _JAVA_OPTIONS: -Xmx1024M
Keystore password for signer #1:
Failed to load signer "signer #1"
java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:666)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:57)
at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:71)
at java.security.KeyStore.load(KeyStore.java:1445)
at ir.cafebazaar.bundlesigner.SignerParams.loadKeyStoreFromFile(SignerParams.java:364)
at ir.cafebazaar.bundlesigner.SignerParams.loadPrivateKeyAndCertsFromKeyStore(SignerParams.java:250)
at ir.cafebazaar.bundlesigner.SignerParams.loadPrivateKeyAndCerts(SignerParams.java:183)
at ir.cafebazaar.bundlesigner.BundleSignerTool.getSignerConfig(BundleSignerTool.java:448)
at ir.cafebazaar.bundlesigner.BundleSignerTool.getContentDigest(BundleSignerTool.java:357)
at ir.cafebazaar.bundlesigner.BundleSignerTool.main(BundleSignerTool.java:126)
java version
java -version
Picked up _JAVA_OPTIONS: -Xmx1024M
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.302-b08, mixed mode)
operation system: Windows 11
I'll be glad to provide any information necessary to find the cause and fix the problem.
Based on my understanding of your issue, it seems that you are encountering problems with using a key generated by a newer version of Java when attempting to use an older version. To help address this, I suggest performing a local test by signing a sample application in our project using your current system and reporting any issues you encounter.
For your convenience, you can access the sample materials for local testing at the following link: Bundle Signer - Test Resources.
Please feel free to provide feedback and report any difficulties you face during the testing process. We'll be glad to assist you further.
The warning you received indicates that your keystore was successfully converted to the JKS format, but it is recommended to migrate to the JKS format as it is an industry-standard format. Below are the steps to convert the keystore to the JKS format and use it:
Convert the keystore to JKS format:
If you want to convert the keystore to the JKS format, you can use the following command:
keytool -importkeystore -srckeystore key_name.jks -srcstoretype PKCS12 -destkeystore key_name.jks -deststoretype JKS
convert to pkcs12
keytool -importkeystore -srckeystore key_name.jks -destkeystore key_name.pkcs12 -deststoretype pkcs12