|
Post by Alex Epifanov on Dec 1, 2021 23:17:35 GMT
It is not clear why jarsigner fails. Try following: 1) check that jarsigner at specified path exists: /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home/bin/jarsigner 2) check if jarsigner has +x permission and try to execute it from command line 3) check if prodcert exists at specified location (/Users/username/Documents/MyApps/MyApp/prodcert ). If not check build log for creation error (with --trace flag ) 4) if prodcert exists try to run signing command manually, exactly as in build log: /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home/bin/jarsigner -sigalg SHA256withRSA -verbose -keystore /Users/username/Documents/MyApps/MyApp/prodcert -storepass 123456 -signedjar "/Users/username/Documents/MyApps/MyApp/bin/target/android/MyApp-bundle-signed.aab" /Users/username/Documents/MyApps/MyApp/bin/tmp/.bundle/bundle.aab rhoprod 5) run build with --trace flag ( like rake device:android:production --trace )and check for specific error when jarsigner gets executed. Verbose log should contain output from jarsigner, you can check it to see why it fails.
|
|
|
Post by fnllc on Dec 2, 2021 11:19:40 GMT
jarsigner works and signs my Android Bundle when I don't specify a location for my certificate. It uses the old one in /Users/username/.rhomobile . However, this one uses a weak key that is not accepted by Google Play anymore. Deleting that directory or specifying a new location in build.yml does not generate a new one and I get the error below:
[DEBUG] RET: jarsigner error: java.lang.RuntimeException: keystore load: /Users/username/Documents/MyApps/MyApp/prodcert (No such file or directory) [ERROR] package:android| Error running jarsigner
I can't figure out when the certificate should be regenerated during the build process. What is the command that I should search for?
|
|
|
Post by Alex Epifanov on Dec 5, 2021 15:36:13 GMT
|
|
|
Post by fnllc on Dec 7, 2021 0:19:31 GMT
The problem is that the following code is not called when building an Android App Bundle:
if not File.exists? $keystore AndroidTools.generateKeystore( $keystore, $storealias, $storepass, $keypass ) end
init_aab_builder in android.rake should be changed to:
def init_aab_builder
if not File.exists? $keystore AndroidTools.generateKeystore( $keystore, $storealias, $storepass, $keypass ) end
builder = AabBuilder.instance
...
end
|
|
|
Post by fnllc on Dec 7, 2021 0:51:47 GMT
The Android App Bundle was accepted by the Google Play Developer Console. I did not use the changes in the commit above because I received an error when generating the keystore.
|
|