Signing app still not working

Hello, according to this https://issuetracker.unity3d.com/issues/android-release-build-fails-with-an-error-keystore-was-tampered-with-or-password-was-incorrect

it should be working, but it is not.

I upgraded to 2019.2 Alpha and created new keystore with key, but an error is still showing...

Can you please suggest a solution? I've tried everything I've found across the forum.

Than you

Fix probably hasn't been ported to 2019.2 yet, only 2019.1. There hasn't been a new build in 10 days.

Same problem yes.. I questioned my sanity for a moment.
I really need 2019.2 not 2019.1

As there are frequent crashes with ads caused by
https://issuetracker.unity3d.com/issues/android-app-crashes-when-invoking-java-proxy-while-the-app-is-in-the-background?_ga=2.255833416.1750011653.1554398584-603230163.1534584586

are only in 2019.2

The fix has been in both 2019.1 and 2019.2 for a while. If this is still causing issues it would be great if you could submit a new bug report.

I'm going to keep this short because I don't have time to write up more than the bug report I already submitted nearly a week ago, but you folks really messed this up in 2019.x and the fix made it worse.

The bug is that you are adding the ' character around the password provided to keytool.exe (e.g. if my password is foobar, you are calling "keytool.exe blah blah -storepass 'foobar'", rather than the correct form of "keytool.exe blah blah -storepass foobar").

Your fix was to also wrap the password in ' marks when creating a new keystore via your UI. This is not the correct solution. There are numerous ways to realize this is incorrect, such as using the keytool on the command line with and without the -storepass argument so you have to type the password in after entering the command, or using a keystore made manually, or via 2018.x, in 2019.x and vice versa, or just googling.

Additionally, 2019's use of keytool.exe now logs the failed call directly to the unity editor log, which makes diagnosing this bug really easy, but also means that anyone bit by this bug now has their entire correct keystore password written in plain text on disk in their unity editor log files, which I'd consider a security issue.

For people stuck on this, you can change a keystore password using keytool.exe, so go wrap your passwords in ' marks until they get this fixed properly.

2 Likes

Wow. @jered_as , thank you for figuring that out. I just upgraded to the 2019.2 alpha (the issue doesn't happen on 2019.1 release), and thought I was going crazy.

@LeonhardP , I can confirm that
a) the actual password didn't work after switching from 2019.1 release to 2019.2 alpha,
b) the password got logged into the console and the editor log in plain text with the error message,
c) I had to change both the keystore password and the project key to be 'password' and
d) I still have to enter password (without ' ) in the Publishing settings so the file gets accessed properly.

What a weird workaround for a weird regression error.
For anyone else stumbling upon this in the meantime, here's how to change both passwords:
https://blog.blundellapps.co.uk/tut-change-alias-passwords-of-your-android-keystore/

The path for the keytool is Editor\Data\PlaybackEngines\AndroidPlayer\Tools\OpenJDK\Windows\bin.

Thanks for keeping this on the surface. The fix actually didn't make it into 2019.2 yet. The bug was mistakenly declared as fixed in our database and the Issuetracker. The fix is now in the landing process for 2019.2 and should become available in the build that is scheduled to be released around May 7.

2 Likes

As far as I know, there are two different problems causing this issue:

The first one is fixed according to the issue tracker already, the second one still pending.

[quote=“Peter77”, post:8, topic: 732458]
As far as I know, there are two different problems causing this issue:

The first one is fixed according to the issue tracker already, the second one still pending.
[/quote]
Indeed, thanks for reporting Peter!

3 Likes

@LeonhardP the beta release notes mention these Android build issues neither in the "Known Issues" nor in the "Fixed" section.

I think it's pretty serious not being able to build for Android through Unity - what's the status of this?

Edit: I tried just hoping for the best, and it seems signing Android builds works again (the weird '' bug is gone). Still think this belongs into the release notes!

1 Like