Search Unity

Bug Unable to list keys in the keystore

Discussion in 'Editor & General Support' started by unitycodergp, Sep 15, 2022.

  1. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    Hello,

    Everything works correctly in version 2021.1 but with 2021.3.9 the keystore is not recognized.

    Here is the error:


    Unable to list keys in the keystore. Please make sure the location and password of the keystore is correct.
    /Applications/Unity/Hub/Editor/2021.3.9f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -Xmx4096M -Dcom.android.sdkmanager.toolsdir="/Applications/Unity/Hub/Editor/2021.3.9f1/PlaybackEngines/AndroidPlayer/SDK/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/Hub/Editor/2021.3.9f1/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

    Environment Variables:
    XPC_SERVICE_NAME = application.com.unity3d.unityhub.35378895.35378901
    XPC_FLAGS = 0x0
    JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
    PATH = /usr/bin:/bin:/usr/sbin:/sbin
    DISPLAY = /private/tmp/com.apple.launchd.UdSO5nDPAx/org.macosforge.xquartz:0
    ORIGINAL_XDG_CURRENT_DESKTOP = undefined
    SHELL = /bin/bash
    SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.kviN0cqRYR/Listeners
    HOME = /Users/xxxxxxxxxxxxxxx
    TMPDIR = /var/folders/lw/f28pkhxj4wjbw9scz7vqdm0r0000gn/T/
    __CFBundleIdentifier = com.unity3d.unityhub
    USER = xxxxxxxxxxxxxxx
    __CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x1
    LOGNAME = xxxxxxxxxxxxxxx
    JAVA_HOME = /Applications/Unity/Hub/Editor/2021.3.9f1/PlaybackEngines/AndroidPlayer/OpenJDK
    COMMAND_MODE = unix2003


    stderr[
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    Error:Invalid command keytool-list
    ]
    stdout[

    ]
    exit code: 64
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)


    Folder /Users/bokken not exist on my mac and my password is correct :)

    Best regards.
     
  2. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    Error:Invalid command keytool-list

    Need space between keytool and -list

    How to modify the script?
     
    Last edited: Sep 16, 2022
  3. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    2 days and no response from support...
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    In two days time you should have at least been able to try the two most obvious things:

    - make a new keystore, see if it works. If it does then your first keystore is corrupt in some way.

    - try a new version of Unity, see if it works. If it does then something is wrong with the version you're using.

    Keep this in mind also:

    Android build not building:

    Recently (circa July 2022) there have been reports of Unity's installer failing to install the Android Tools.

    https://forum.unity.com/threads/cant-build-for-android.1306098/

    If it's not that, then here's how to troubleshoot:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If it does NOT build, then go fix your Unity installation, or your other tools, such as Android SDK, NDK, JDK, etc.

    Until you can build a blank project to the target platform, don't fiddle with anything else.

    Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

    Most often things that prevent building are third-party libraries such as Firebase.

    Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

    It may also be helpful to work through a tutorial or two for that subsystem.
     
  5. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    As I stated in my message: Everything works correctly in version 2021.1 but with 2021.3.9 the keystore is not recognized.
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Cool! What happens if you make a new keystore and try it? If that doesn't work either then that version of Unity is cursed, try another.

    (Note: This is all ANY support response is going to tell you and should be on the hot list of things you try when something doesn't work. They're not going to tell you some magic set of secret keystrokes to make it work. This is just basic troubleshooting 101 and you have to step up the game.)
     
  7. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    No comment.
     
  8. unity_hIYsjMNBSutupg

    unity_hIYsjMNBSutupg

    Joined:
    Aug 16, 2019
    Posts:
    3
    Hi,
    I have the same issue. For me it started after replacing macBooks. It works on the older one but not on the newer one. All commands seam to be without the space as you mentioned and thats why it's not working. Have you found a solution to this?
     
  9. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    Hi,
    Like you the problem occurred after a change of macbook and I still haven't solved the problem.
    No answer from Unity support to a Pro member.
    Thank you.
     
  10. unity_hIYsjMNBSutupg

    unity_hIYsjMNBSutupg

    Joined:
    Aug 16, 2019
    Posts:
    3
    I downgraded the system to the original one and it works there. After I updated again to 12.6 it stopped.
    I'm unable to create a new one in the project that I'm working on. When I create a brand new project then I'm able to create a new one but when I reopen Unity and try to use it it doesn't work anymore.
    To make it more confusing my team buddy has the same OS version and no issues
     
  11. unity_hIYsjMNBSutupg

    unity_hIYsjMNBSutupg

    Joined:
    Aug 16, 2019
    Posts:
    3
    I have fixed it.
    Not sure what exactly helped but things that I did:
    - installed python 3.6
    - installed .Net SKD
    - updated every single firebase sdk (I did that because I wasn't even able to export the project)
    And idk why but now I can use keystores within Unity
     
  12. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    Thank you but does not work in my case.

    To Unity support:
    a big thx for your great help :(
     
  13. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,163
    Today I got this error too in unity 2023.1.8f1

    > Invalid command keytool-list

    As it seem. I think it was totally a bug in unity build command. It should be `keytool -list` but for some reason the space was missing
     
  14. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,163
    Test for 4 stream

    This problem occur in 2023.1f and 2023.2b

    Not happen in 2021.3f and 2022.3f

    So it seem maybe the problem most likely occur in newer version of android sdk
     
  15. CrazyCod3r

    CrazyCod3r

    Joined:
    Aug 11, 2021
    Posts:
    10
    Got the same error after switching from LTS 2022.3.4f1 to 2023.1.8f1. Also checked 2023.1.0f1 - same error.

    Besides the missing space, it seems there's some invisible symbol right before the 'keytool' word.

    Could Unity support say something about it - when do you plan to fix this?
     
    Last edited: Aug 15, 2023
    Thaina likes this.
  16. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,163
    Or maybe this issue should be put in android platform category?
     
  17. CrazyCod3r

    CrazyCod3r

    Joined:
    Aug 11, 2021
    Posts:
    10
    Idk, I tried to use older (working) Android SDKs in these new Unity versions by choosing different paths in "Edit - Preferences - External Tools", but it didn't help. So, I guess it's not about the SDK, but about Unity itself.
     
    Thaina likes this.
  18. offka

    offka

    Joined:
    Nov 24, 2013
    Posts:
    2
    Hello everyone. I hope this information will help someone. I encountered a similar issue when migrating from Unity 2019 to 2022.3.4f1 (keytool-list). First, to make sure it was related to Unity, I created a blank project and tried to open my keystore – everything worked, the password was correct. That's when I realized the problem wasn't with Unity itself, but rather with my assets (previously I tried deleting Libraries, Project Settings, User Settings, etc.). Through trial and error, I managed to determine that the outdated Firebase plugin was the culprit. After updating it, everything started working, and I was able to build successfully. Try updating your plugins, perhaps in your case, the issue might also lie with them.
     
    Thaina likes this.
  19. ruslansmax

    ruslansmax

    Joined:
    Mar 30, 2014
    Posts:
    2
    Just deleting or updating Firebase sdk resolved the issue
     
  20. CrazyCod3r

    CrazyCod3r

    Joined:
    Aug 11, 2021
    Posts:
    10
    No, unfortunately it doesn't work in my case :(
     
  21. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,163
    I met the same issue and tried to investigate a bit then found this weird problem

    in editor log of unity itself it seem normal

    But in log file it have some glitch character



    I am now suspect that unity might try to set some weird locale or localization that conflict with some windows 10 machine, maybe?