Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by pigaroos · Dec 02, 2019 at 09:39 PM · keystorekeys

Unity is saying my keystore password is wrong

Hello everyone, yesterday I tried to use a keystore while building my game (to android). However, Unity always thinks that the password I inputted is wrong, even though I have made sure it is not. It could also be in the path, as Unity keeps saying

Unable to create key in keystore. Please make sure the location and password of the keystore is correct.

So what do I do? I have been trying for hours and hours, so any input would be truly awesome.

EDIT: I can work around this first error (the one that doesn't allow me to select the alias), but when I try to build it it then displays these:

 FAILURE: Build failed with an exception.
 Execution failed for task ':packageRelease'.
 > Failed to read key alias from store "C:\Keystore\user.keystore": Keystore was tampered with, or password was incorrect
 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 * Get more help at https://help.gradle.org
 BUILD FAILED in 6s
 Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0a14\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
 Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0a14\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
 Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0a14\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-28\package.xml. Probably the SDK is read-only
 Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0a14\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
 :compileReleaseAidl NO-SOURCE
 :compileReleaseNdk NO-SOURCE
 :processReleaseJavaRes NO-SOURCE
 :packageRelease FAILED
 28 actionable tasks: 5 executed, 23 up-to-date
 CommandInvokationFailure: Gradle build failed. 
 C:\Program Files\Unity\Hub\Editor\2019.1.0a14\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.1.0a14\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
 Build completed with a result of 'Failed'
 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
 UnityEditor.BuildPlayerWindow+BuildMethodException: 56 errors
 
   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00234] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190 
 
   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:96 
 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
 (I left out a few "UP-TO-DATE" messages)

Sorry for all this text, but I think it can be useful when dealing with this. Again, any input would mean the world to me.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Larry-Dietz · Dec 02, 2019 at 10:44 PM

If this is an unpublished game, there is no harm that I can think of, to just creating a new keystore, and resigning the game.

So that is what I would recommend doing. Just create a new one, and be very careful when creating a password for the new keystore, so you can be sure you are using the correct one.

Comment
Add comment · Show 10 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image pigaroos · Dec 02, 2019 at 11:08 PM 0
Share

Oh, I have done that more times than I could count already. Used passwords without symbols. Without capitals. Without symbols and capitals. I even just copy and pasted them everywhere to make sure it was 100% correct.

avatar image Larry-Dietz pigaroos · Dec 03, 2019 at 12:15 AM 0
Share

After you created the keystore, have you verified that the keystore file is there? I am wondering if you are dealing with a write permissions issue, and the file is failing to get created?

avatar image pigaroos Larry-Dietz · Dec 03, 2019 at 12:59 AM 0
Share

Oh, they're definitely there, as seen through the file explorer. I don't know why this is happening...

Show more comments
avatar image
0

Answer by pigaroos · Dec 05, 2019 at 12:12 PM

Alright, so Larry and I found a solution to this, if anyone needs it. It goes like this:

1.Create a new keystore through the Keystore Manager in Unity


2.Move it to where your keytool.exe is located, usually it's in C:\Program Files (x86)\Java\jre1.8.0_181


3.Open Command Prompt


4.type in cd\


5.type in cd "Program Files (x86)"\Java\jre1.8.0_181\bin


6.type in keytool -keypasswd -alias [your alias] -storetype [your storetype, probably jks] -keystore [your keystore file name, include the extension]


7.type in your keystore password between single quotes (important)


8.type in the key password that you typed in Unity (without any quotes)


9.retype it


10.If no errors show up, go back to Unity


11.Check the "Custom Keystore" box


12.from now on, order is extra important


13.Select your keystore file name (not browse) in the dropdown below the checkbox (if it doesn't show up, change the Dedicated Keystore location in Edit > Preferences > External Tools to the one on step 2)


14.Type in the keystore password that you used when creating the keystore in the keystore password field


15.From the alias dropdown below, select your alias


16.Type in the alias password that you changed to in the command prompt (if you used the same one as before on the command prompt then use that)


17.After both passwords are in, change the keystore password to your keystore password but between single quotes (for example, if my password is ab1234, then it would be 'ab1234')


18.Click Build in Build Settings


19.Enjoy your build!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nicsure · May 12, 2020 at 05:50 AM 0
Share

If I'm getting this correct, the issue arises from Unity incorrectly passing parameters to the keystore exe. It's appending and prefixing a single quote to the start and end of the password? Am I right?

avatar image
0

Answer by bleater · Sep 15, 2021 at 08:57 AM

The thing that I found critical was setting the keystores default location in Unity's preferences, so that I could then select the actual keystore from the dropdown list. Using "browse" never worked. Thanks!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by DadNapper · Apr 18 at 08:19 AM

After upgrading Unity to 2021, Unity didn't accept my keystore password even I typed it correctly. I saw on other posts that this could be due to using special characters in the keystore password. To fix the issue I did the following:


1) Installed Keystore Explorer

2) Opened my old keystore file in Keystore Explorer by entering my keystore password

3) Then I right-clicked on the certificate and selected "unlock". Then entered password to unlock it.

4) Right clicked on the certificate and selected "copy"

5) Created a brand new keystore (File > New > JSK) and pasted the certificate (right click > paste)

5) Assigned a new password for the certificate via right-click (avoided special characters this time)

6) Saved the new keystore (which required a new password)

7) Then reimported the keystore into Unity! Done!


Hope this helps somebody!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

118 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What is the different between key password? 1 Answer

unity always set my key alias to debug in Android 1 Answer

Turret Rotation Controlled by Arrow Keys 2 Answers

How can I export/import accurately my animation keys/tangents from Max to Unity? 0 Answers

C# inputString mouse Keys? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges