Unable to create keystore. Please make sure the location of the keystore is valid.

Sorry for posting the same thing on a different forum um not sure on which one to post…

The version of unity i am using is 2023.1.13f1. This is the error i get when attempting to create a new keystore. I didnt really find any useful solutions online. Are there any other ways to sign the application? I want to publish my app on google play store. Any help would be helpful. Here is the entire error message.

9382304–1312247–unityerror.txt (10.8 KB)

Wow, that looks like a Unity error… there is an illegal UTF codepoint in the command stream:

9382472--1312301--Screen Shot 2023-10-01 at 12.34.27 PM.png

AFAIK, <feff> is a ZERO WIDTH NO BREAK SPACE and should NEVER be sent to an external tool.

You can try a different version of Unity to make the keystore, or just make it from the native Android tools yourself, then tell your Unity to use it. Google for how… it’s a lot of really really REALLY annoying command line fiddling to get just right unfortunately. :confused:

Thank you very much for the reply i tried creating the keystore in another project in a different unity version (2022.3.9f1) and it worked. Then i tried to use that keystore in my project and it always said wrong password (i set the password for everything to 0123456789 just in case) and the console showed the same error and i checked the was still there. So i just transfered my project to the unity version in which i managed to create a keystore and now it works.

So in short, thanks for the help. <3

I have the same problem version 2023.1.9f. I downgraded and the keystore was generated, but some affected libraries are trying to resolve it. but I believe that the 2023 versions are not stable for this purpose

Happen to me as well. And it seem it was the problem only in unity 2023.With the same keytool as other version

9477199--1332358--upload_2023-11-17_13-56-34.png

It seem string concatenate between sdktools.jar and keytool-list (or any command for sdktools) are doing in some system that not support unicode. And unity 2023.2.0 still not fixed this

@manugil @Tomas1856 Are there anyway we can make this reproducible in your machine?

I am trying to investigate and it seem it was the problem in some windows machine and only some machine. My home machine don’t have this problem but my office machine did. And the problem is the problem related to encoding and code page setting

I have no idea how to fix this but it should be fixed easily from unity set the encoding for stdin of every process

I have investigate deeper and found out that unity’s mono use Console.InputEncoding

https://github.com/Unity-Technologies/mono/blob/075f9e23d561d64d4f0722423e9144f425b6435a/mcs/class/System/System.Diagnostics/Process.cs#L805-L811

Just override it make it work normally

#if UNITY_EDITOR
    [InitializeOnLoadMethod]
    static void Init()
    {
        Console.InputEncoding = new UTF8Encoding(false);
    }
#endif


In my case, since i was using firebase, i had to delete those files located in Assets\Firebase\Editor.
After deleting those files, everything worked as usual and i didn’t need to add those files back.

Just for people that encounter this problem.


I had the same problem, but after disabling this checkbox it solved it

I had try that too but won’t work for me

Thank you so much for your help. Been spending hours trying to make it work. (by making the script in Assets/Editor)

Unity really need to fix this asap.

worked for me also, thanks for sharing