When I click on anything on the services windows it shows me this error?

Hello mates,
So I open the services window and when I click on anything let’s say the Ads button nothing happens and it shows me this error in the console:

InvalidCastException: Specified cast
is not valid.
UnityEditor.Connect.ServicesUtils.OpenServicesProjectSettings
(System.String
servicesProjectSettingsPath,
System.String
projectSettingsClassName) (at
:0)
UnityEditor.Connect.ServicesUtils.OpenServicesProjectSettings
(UnityEditor.Connect.SingleService
singleService) (at
:0)
UnityEditor.Connect.ServicesEditorWindow+<>c__DisplayClass42_0.b__0
() (at
:0)
UnityEngine.UIElements.Clickable.Invoke
(UnityEngine.UIElements.EventBase evt)
(at
:0)
UnityEngine.UIElements.Clickable.ProcessUpEvent
(UnityEngine.UIElements.EventBase evt,
UnityEngine.Vector2 localPosition,
System.Int32 pointerId) (at
:0)
UnityEngine.UIElements.Clickable.OnMouseUp
(UnityEngine.UIElements.MouseUpEvent
evt) (at
:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke
(UnityEngine.UIElements.EventBase evt)
(at
:0)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks
(UnityEngine.UIElements.EventBase evt)
(at
:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent
(UnityEngine.UIElements.EventBase evt)
(at
:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase
(UnityEngine.UIElements.EventBase evt)
(at
:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent
(UnityEngine.UIElements.EventBase evt,
UnityEngine.UIElements.IPanel panel)
(at
:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies
(UnityEngine.UIElements.EventBase evt,
UnityEngine.UIElements.IPanel panel,
System.Boolean
imguiEventIsInitiallyUsed) (at
:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent
(UnityEngine.UIElements.EventBase evt,
UnityEngine.UIElements.IPanel panel)
(at
:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue
() (at
:0)
UnityEngine.UIElements.EventDispatcher.OpenGate
() (at
:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose
() (at
:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent
(UnityEngine.UIElements.EventBase evt,
UnityEngine.UIElements.IPanel panel)
(at
:0)
UnityEngine.UIElements.EventDispatcher.Dispatch
(UnityEngine.UIElements.EventBase evt,
UnityEngine.UIElements.IPanel panel,
UnityEngine.UIElements.DispatchMode
dispatchMode) (at
:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent
(UnityEngine.UIElements.EventBase e,
UnityEngine.UIElements.DispatchMode
dispatchMode) (at
:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch
(UnityEngine.UIElements.BaseVisualElementPanel
panel) (at
:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent
(System.Int32 instanceID,
System.IntPtr nativeEventPtr,
System.Boolean& eventHandled) (at
:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent
(System.Int32 instanceID,
System.IntPtr nativeEventPtr) (at
:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2
(System.Int32 i, System.IntPtr ptr)
(at
:0)
UnityEngine.GUIUtility.ProcessEvent
(System.Int32 instanceID,
System.IntPtr nativeEventPtr,
System.Boolean& result) (at
:0)

So for anyone who’s still getting this problem, I think I found the solution:
Close the “Project Settings” tab, then try again. Worked for me.