I’m getting this with 2023.1.10f1
I have an existing keystore I had backup, which is set correctly in the player settings and allows me to select keys via the old password.
This is an update to an old app from 2016, so I used the old key. Build with no errors.
Uploaded .aab to Google Play to alpha test but Google says:
To upload an Android App Bundle you must be enrolled in Play App Signing.
So I thought I’d try a new keystore, but I get the following (Full Error log below the fold):
CommandInvokationFailure: Unable to create key in keystore. Please make sure the location and password of the keystore is correct.
D:\Program Files\Unity\2023.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir=“D:\Program Files\Unity\2023.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\6.0” -Dfile.encoding=UTF8 -jar “D:/Program Files/Unity/2023.1.10f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\sdktools.jar” -
The tools directory exists as well as the sdktools.jar but the windows explorer path is
“D:\Program Files\Unity\2023.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\sdktools.jar”
Firstly the whole signing process for upload to Google play is very unlcear and confusing.
Second, I can’t create a new keystore with a freshly installed 2023.1.10f1 which is working fine otherwise building and running to devices (S8 + Tab A7 both tested aok).
Anyone with advice on:
- How to fix the keystore issue
- A clear guide to properly signing an old updated app now built as a .aab to google play via Unity?
thanks!
Update:
I rebuilt it with a signed keystore (original key) as an apk and successfully uploaded it for internal testing. So that works, but I still have the issues noted above. Google seems really insistant on apps now being aab not apk, and I can’t do that with the current problems I’m having.
Update2: Google let me release an update as an apk and successfully signed by my old keystore. However, they warn they want aab from here on out, but I still have the issues as outlined above.
Any help from Unity would be appreciated in how to resolve this.
Full Error:
CommandInvokationFailure: Unable to create key in keystore. Please make sure the location and password of the keystore is correct.
D:\Program Files\Unity\2023.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir=“D:\Program Files\Unity\2023.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\6.0” -Dfile.encoding=UTF8 -jar “D:/Program Files/Unity/2023.1.10f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\sdktools.jar” -
Environment Variables:
[DELETED ENVIRONMENT VARIABLES]
[
stderr[
Exception in thread “main” java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at SDKMain.main(SDKMain.java:63)
Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/cms/CMSObjectIdentifiers
at org.bouncycastle.operator.DefaultSignatureNameFinder.(Unknown Source)
at org.bouncycastle.operator.jcajce.OperatorHelper.(Unknown Source)
at org.bouncycastle.operator.jcajce.JcaContentSignerBuilder.(Unknown Source)
at UnityKeyToolGenKey.(UnityKeyToolGenKey.java:96)
at UnityKeyToolGenKey.main(UnityKeyToolGenKey.java:35)
… 5 more
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.cms.CMSObjectIdentifiers
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
… 10 more
]
stdout[
]
exit code: 1
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[ ] sdkToolCommand, System.String workingdir, System.String errorMsg, System.Int32 memoryMB) (at <4709dcde0756469fa99c122f81326ca3>:0)
UnityEditor.Android.AndroidSDKTools.RunCommand (UnityEditor.Android.AndroidJavaTools javaTools, System.String[ ] sdkToolCommand, System.String errorMsg) (at <4709dcde0756469fa99c122f81326ca3>:0)
UnityEditor.Android.AndroidSDKTools.CreateKey (UnityEditor.Android.AndroidJavaTools javaTools, System.String keystore, System.String storepass, System.String alias, System.String password, System.String dname, System.Int32 validityInDays) (at <4709dcde0756469fa99c122f81326ca3>:0)
UnityEditor.Android.AndroidKeystoreWindow.CreateKey () (at <4709dcde0756469fa99c122f81326ca3>:0)
UnityEditor.Android.AndroidKeystoreWindow.OnGUI () (at <4709dcde0756469fa99c122f81326ca3>:0)
UnityEditor.HostView.OldOnGUI () (at <8059afc4969f4faea44ce7e8d8dd149e>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.IMGUIContainer.ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase evt) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_DefaultActionAtTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElement (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.MouseEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <4322acfaa54d4517b2ed018dde30cfb9>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at :0)