This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

This is my setup :

Godot 3.0.6 (official export template)
Ubuntu 16 LTS
Java version (jarsigner, keytool..) oracle jdk 8

When exporting my game for debugging / 1 click on the phone, it works perfectly.
When using a release key (debug off) and adjusting the info in export dialog, the apk fails to be created with this error :

'jarsigner' returned with error 1
Export templates for this platform are missing/corrupted: Android

Sample of keytool usage:

keytool -genkey -v -keystore my-release-key-test.jks -keyalg RSA -keysize 2048 -validity 10000 -alias TestEngine

/usr/lib/jvm/java-8-oracle/bin/keytool -genkey -v -genkeypair -storepass mytest -alias myuser -keypass mypass -keystore my-release-key-test.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias TestEngine

keytool -genkey -v -genkeypair -alias myuser -keypass mypass -keystore my-release-key-test.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias TestEngine -sigalg SHA1withRSA

I already checked similar questions but none of the tips worked for me:

https://godotengine.org/qa/265/how-release-project-google-play-store-android-release-mode

https://godotengine.org/qa/30777/problems-with-the-after-export?show=30777#q30777

Any ideas... ?
Thx in advance

in Engine by (895 points)

Following this thread I managed to get more details about my problem (using -d cmd line switch):

jarsigner error: java.lang.RuntimeException: keystore load: Keystore was tampered with, or password was incorrect

However when typing this :

keytool -list -keystore myKeystore.keystore

(store password : mytest)

the cmd returns success.

PS: Also tried the recommend sigalg in the link MD5withRSA that didn't work...

2 Answers

+4 votes
Best answer

Finally solved it ! (if it helps you, kindly vote it up with the arrow on the left)

As i continued my investigation, I tried the following 2 things:

Replaced the release password (should be -keypass parameter) with the keystore password ( -storepass ) then got this error:

Enter key password for monUser: Exception in thread "main" java.io.IOError: java.io.IOException: Input/output error
    at java.io.Console.readPassword(Console.java:314)
    at java.io.Console.readPassword(Console.java:352)
    at sun.security.util.Password.readPassword(Password.java:57)
    at sun.security.util.Password.readPassword(Password.java:40)
    at sun.security.tools.jarsigner.Main.getPass(Main.java:2125)
    at sun.security.tools.jarsigner.Main.getAliasInfo(Main.java:2066)
    at sun.security.tools.jarsigner.Main.run(Main.java:248)
    at sun.security.tools.jarsigner.Main.main(Main.java:116)
Caused by: java.io.IOException: Input/output error  

Cleared the Release user (-alias) and got this error :

jarsigner: Certificate chain not found for: .   must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

Then it hit me, Godot user interface export dialog, is asking for only 1 password
but we have 2 ==> solution : keypass and storepass MUST be equal (The same)

Once I did that, it worked, apk was generated, and upload to Google play store was also successful :-)

Cheers !

by (895 points)
selected by
0 votes

I had similar issues until I defined all keystores with user and password filled in both in Editor settings and in the Project Export settings.

by (217 points)

Hey thx for your tip, tried it but it didn't work (restarted the Editor, with debug on / off, runnable on / off)...
Any other suggestion ?

That was my exact problem. Thanks unfa. I needed to put the alias and password in both the Editor Settings|Android and the Project Export page

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.