Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Signing app still not working

Discussion in '2019.2 Beta' started by hvacek22, Feb 16, 2019.

  1. hvacek22

    hvacek22

    Joined:
    Apr 24, 2018
    Posts:
    28
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Fix probably hasn't been ported to 2019.2 yet, only 2019.1. There hasn't been a new build in 10 days.
     
  3. DavidZobrist

    DavidZobrist

    Joined:
    Sep 3, 2017
    Posts:
    234
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    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.
     
  5. jered_as

    jered_as

    Joined:
    Dec 4, 2015
    Posts:
    3
    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.
     
    fherbst and DavidZobrist like this.
  6. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    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.
     
    Last edited: Apr 24, 2019
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    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.
     
    fherbst and FROS7 like this.
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    fherbst, FROS7 and Peter77 like this.
  10. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @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!
     
    Last edited: May 10, 2019