When I attempt to build an app using any key in our keystore other then the first key created, I get this message
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:packageRelease’.
java.io.IOException: Failed to digitally sign signature file.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
If I build that same app with the initial key in our keystore, the app builds. If I attempt to build that app with the initial key but purposefully use the wrong password it fails with a completely different exception (cannot recover key).
Our intention was to have one Keystore for all of our apps, but a different key for each app. Any help would be appreciated
I should point out that our KeyStore and initial Key were created using Dictionary App Builder 1.5
I just ran an experiment where I used DAB 2.0 to create a new KeyStore and new Key and then attempted to use that new Key to sign a brand new dictionary app and received the same “Failed to digitally sign signature file”.
I was getting the same error message in Reading App Builder and was able to solve the problem.
The underlying reason is that Java versions >8.91 reject the keys that RAB and DAB create. I installed the new version (4.0) of SAB yesterday which necessitated an upgrade of Java. I grabbed the latest which was greater than 8.91 and this caused RAB to no longer be able to build apps because it uses the same version of Java.
SAB seems to be able to handle this because it can still use the old keys so I assume that RAB and DAB will eventually get whatever fix SAB has received.
For now it seems we have two choices:
- We can install a version of Java <8.91
- We can generate a key with a third party program (like KeyStore Explorer) that allows you to pick an algorithm for the key. I tried this, and it worked for me as long as I chose RSA2048 as my algorithm and “SHA-256 with RSA” as my signature algorithm. it would not work with DSA which seems to be what the AB programs generate.
Yes, this problem happens with the more recent versions of the JDK. We are hoping to release new versions of RAB and DAB in the coming week which solve this. As Tim suggests, the workaround is to install an older version of the JDK.