Can not sign the application
We're having a problem creating a usable Keystore-file for publishing an App to Google Play.
We are able to create the keystore-file using Unity-->PlayerSettings-->Publishing Settings-->Keystore Manager - but whenever we try to build the APP, we get the following error.
UnityException: Can not sign the application
Unable to sign the application; keystore file not found!
KeyStore Manager: you should notice the following scenarios:
Whenever we create a new keystore-file, including a single new key, Unity can automatically both select and set the keystore-location and the Project Key.
Whenever I point to an existing keystore-file, and have to select the project key, The UI is showing a line just below, saying [Wrong Password]
The keystore-file is always located in the same location as specified in Unity3D-->Edit-->Preferences-->[Keystores Dedicated Location] - see this link:
https://answers.unity.com/questions/1586851/unable-to-create-key-in-keystore-2.html
In order to find a solution to this problem we also have tried to generate a keystore-file with at new key by commandline:
keytool.exe -genkey -v -keystore C:\got.keystore -alias got -keyalg RSA -keysize 2048 -validity 10000
And tried importing the certificat downloaded on Google Play from the new App, hoping this will solve the problem:
keytool.exe -importcert -file "C:\deployment_cert.der" -keystore "C:\got.keystore"
Both with and without the suggested migration to the standard PKCS12 format:
keytool.exe -importkeystore -srckeystore C:/got.keystore -destkeystore C:/got.keystore -deststoretype pkcs12
The verification always shows a single key as expected, with a SHA1-fingerprint: got, DD-MM-YYY, PrivateKeyEntry:
keytool.exe -list -keystore C:/got.keystore"
But in all cases above we see similar errore, which either are indicating problems with password or location of the Keystore-file.
The App is already released under iOS on AppStore.
It can be deployed on locale Android-devices without problems.
We are using Unity version 2019.2.0a4 (I know this is alpha, but the first upload is for internal tests solely)
We are running Visual Studio Community Edition version 15.9.7 on Windows 10 with most reasent updates.
What are we doing wrong here?
Answer by PerPasgaard · Feb 20, 2019 at 01:17 PM
The problem is solved. We downgraded the Unity alpha-version to the latest beta version 2019.1.0b4, whick resulted in a succesfull build.
Answer by mr-mathews · Jul 09, 2019 at 09:48 PM
@PerPasgaard There is a workaround to this bug. The path Unity was putting together included the current directory by default. When I looked at what the build process was trying to access it showed as`$PWD\$Path` $PWD being the current directory the Unity process is running from - in my case the source directory for the build pipeline. The $Path was a fully qualified path to the location of the keystore. This becomes invalid when the current directory is added to the beginning.
If you're curious about this open ProcMon and watch for NAME INVALID results during the Unity build process.
@mr-mathews we're experiencing the same behavior, but only on windows. What is the workaround?
Your answer
![](https://koobas.hobune.stream/wayback/20220612192059im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Keystore Problem 0 Answers
What is a Keystore 1 Answer
Subscription Key - Keystore 0 Answers
keystore error while building after SKD update 0 Answers
Unable to create key in keystore. 2 Answers