Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug InvalidCastException when clicking Test Framework in Package Manager as of 1.3.1

Discussion in 'Testing & Automation' started by jake_card, Nov 28, 2022.

  1. jake_card

    jake_card

    Joined:
    Oct 2, 2014
    Posts:
    57
    When Test Framework 1.3.1 started appearing in the Package Manager, I started getting the following error message any time I tried to click it:

    InvalidCastException: Specified cast is not valid.
    UnityEditor.PackageManager.UI.DictionaryExtensions.Get[T] (System.Collections.Generic.IDictionary`2[TKey,TValue] dict, System.String key, T fallbackValue) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.Sample+<>c__DisplayClass26_0.<FindByPackage>b__0 (System.Collections.Generic.IDictionary`2[TKey,TValue] sample) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    UnityEditor.PackageManager.UI.PackageSampleList.SetPackageVersion (UnityEditor.PackageManager.UI.IPackageVersion version) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.PackageDetails.RefreshContent () (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.PackageDetails.SetPackage (UnityEditor.PackageManager.UI.IPackage package, UnityEditor.PackageManager.UI.IPackageVersion version) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.PackageDetails.OnSelectionChanged (UnityEditor.PackageManager.UI.IPackageVersion version) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.PageManager.OnPageSelectionChanged (UnityEditor.PackageManager.UI.IPackageVersion version) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.BasePage.TriggerOnSelectionChanged (UnityEditor.PackageManager.UI.IPackageVersion version) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.BasePage.SetSelected (System.String packageUniqueId, System.String versionUniqueId) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.BasePage.SetSelected (UnityEditor.PackageManager.UI.IPackage package, UnityEditor.PackageManager.UI.IPackageVersion version) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.PageManager.SetSelected (UnityEditor.PackageManager.UI.IPackage package, UnityEditor.PackageManager.UI.IPackageVersion version, System.Boolean forceSelectInInspector) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.PackageItem.SelectMainItem () (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEditor.PackageManager.UI.VisualElementExtensions+<>c__DisplayClass0_0.<OnLeftClick>b__0 (UnityEngine.UIElements.MouseDownEvent e) (at <ed837578bccf4c6b8782007e6c413adc>:0)
    UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <c735460d95a241ccbea413909634f410>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <681fdbd9389e4d6e8755fe4f632bfbbe>:0)


    I'm on Unity 2020.3.36f1. The error appears in my Unity console the moment I click on the "Test Framework" entry in the package manager. This wasn't happening prior to the release of 1.3.1.