QuantumCalzone / UnityGitPackageUpdater

Easily update Unity packages hosted via git
MIT License
43 stars 6 forks source link

No action on first attempt, second attempt gives "ArgumentException: oldValue is the empty string" #4

Open guneyozsan opened 3 years ago

guneyozsan commented 3 years ago

I tried to update the Git package for Google Cardboard SDK from v1.4.1 to the latest v1.6.0. It does nothing when I first click the package name. Sequential attempts give ArgumentException: oldValue is the empty string.

image

ArgumentException: oldValue is the empty string.
System.String.ReplaceInternal (System.String oldValue, System.String newValue) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.String.Replace (System.String oldValue, System.String newValue) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
QuantumCalzone.GitPackageUpdaterEditorWindow.ReinstallPackage (System.String packageName) (at Library/PackageCache/com.quantumcalzone.unitygitpackageupdater@82a9836fdc/Editor/EditorWindows/GitPackageUpdaterEditorWindow.cs:186)
QuantumCalzone.GitPackageUpdaterEditorWindow.OnGUI () (at Library/PackageCache/com.quantumcalzone.unitygitpackageupdater@82a9836fdc/Editor/EditorWindows/GitPackageUpdaterEditorWindow.cs:92)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <3d1d98bfb8b543c39074f81ee5a7c4a3>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <3d1d98bfb8b543c39074f81ee5a7c4a3>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <3d1d98bfb8b543c39074f81ee5a7c4a3>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <3d1d98bfb8b543c39074f81ee5a7c4a3>:0)
UnityEditor.DockArea.OldOnGUI () (at <3d1d98bfb8b543c39074f81ee5a7c4a3>: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 <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <a6a8a08b59d34373858eada2d852ad38>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <023156577e4f4156adf0f4b3a3fedf85>:0)
QuantumCalzone commented 2 years ago

Pushed an update right now. Could you give it a try again? Also, sometimes you have to click away from Unity and re-focus on the app to trigger the Package read process. I can't find any command to trigger it reliably as of now.

guneyozsan commented 2 years ago

Hello,

I just tried it. I can say it works but it needs some intervention for my config.

In my setup, Preferences/Auto Refresh is disabled.

image

After clicking "update", if I do Ctrl+r (refresh) it refreshes the assets and recompiles the scripts, and the plugin I wanted to update is correctly updated.

If I don't do Ctrl+r (refresh) it eventually crashes. For example:

Maybe a force refresh option at the end of the operation could prevent this issue. One of the methods mentioned here can be used for forcing a refresh: http://answers.unity.com/answers/1210416/view.html

NullReferenceException: Object reference not set to an instance of an object
GitPackageUpdater.GitPackageUpdaterEditorWindow.ReinstallPackage (System.String package) (at Library/PackageCache/com.quantumcalzone.unitygitpackageupdater@b35a8ae38c/Editor/EditorWindows/GitPackageUpdaterEditorWindow.cs:149)
GitPackageUpdater.GitPackageUpdaterEditorWindow.OnGUI () (at Library/PackageCache/com.quantumcalzone.unitygitpackageupdater@b35a8ae38c/Editor/EditorWindows/GitPackageUpdaterEditorWindow.cs:94)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <3d6d6a4a6d7c4ec2aa654b7d8f54a096>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <3d6d6a4a6d7c4ec2aa654b7d8f54a096>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <3d6d6a4a6d7c4ec2aa654b7d8f54a096>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <3d6d6a4a6d7c4ec2aa654b7d8f54a096>:0)
UnityEditor.DockArea.OldOnGUI () (at <3d6d6a4a6d7c4ec2aa654b7d8f54a096>: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 <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <cb39c3d61d484a1d9d85158bfe5b2e83>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <c6fb44a03db64bd4a43ea88cab15457f>:0)
guneyozsan commented 2 years ago

More information: