Search code examples
dynamics-crmmetadatacrmdynamics-crm-2013

Plugin Registration Tool crush when press "Filtering Attribute" button + Metadata Browser cant open


I'm using Microsoft Dynamics® CRM 2013 Service Pack 1 (SP1) (6.1.1.132) (DB 6.1.1.132)

After connecting the Registration Tool, following this steps.

Plugin Registration Tool >> Plugin >> Step(double click)

Here Picture

When i hit the [...] button its crush.

I think its about MetaData Service. Because when try to open Metadata browser, its pops up error too.

Entity Metadata Browser:  Error Code:-2147220970  Message: An unexpected error occurred.

Metadata Browser: Error Code:-2147204733 Message: Unable to evaluate query

Here my Event Logs,

1) Application Error

Faulting application name: PluginRegistration.exe, version: 6.1.0.519, time stamp: 0x5367f521
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18666, time stamp: 0x58f33794
Exception code: 0xe0434352
Fault offset: 0x00000000000095fc
Faulting process id: 0x150c
Faulting application start time: 0x01d2e10c71f17a5b
Faulting application path: E:\Binovist\Setup\MSCRM2013SDK6.1\SDK\Tools\PluginRegistration\PluginRegistration.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: cd4a09ca-4cff-11e7-8129-0050568345e5
Faulting package full name: 
Faulting package-relative application ID:

2) .NET Runtime

Application: PluginRegistration.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
   at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
   at System.Reflection.MethodBase.Invoke(System.Object, System.Object[])
   at System.Windows.Interactivity.TriggerBase.InvokeActions(System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.Controls.Control.HandleDoubleClick(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run()
   at Microsoft.Crm.Tools.PluginRegistration.App.Main()

When i used old version of Plugin Registration Tool, its pops up another Error:

System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: An unexpected error occurred. (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).  

mscorlib Assembly Version: 4.0.0.0

Thanks for Advice

Edit: Trace Log

[2017-06-13 17:30:58.499] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   19 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: aec6f850-c7a9-4510-aea4-635b74dbb05c | ExceptionConverter.ConvertMessageAndErrorCode  ilOffset = 0x46
>enter: ConvertMessageAndErrorCode: System.TypeInitializationException: The type initializer for 'Microsoft.Crm.MetadataService.Sdk.TypeMaps.PlatformToXrmEntityMetadataTypeMap' threw an exception.
[2017-06-13 17:30:58.500] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   19 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: aec6f850-c7a9-4510-aea4-635b74dbb05c | ExceptionConverter.ConvertMessageAndErrorCode  ilOffset = 0x23B
>System.TypeInitializationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D1415F8A: System.TypeInitializationException: The type initializer for 'Microsoft.Crm.MetadataService.Sdk.TypeMaps.PlatformToXrmEntityMetadataTypeMap' threw an exception. ---> System.MissingMethodException: Method not found: 'System.Nullable`1<Boolean> Microsoft.Xrm.Sdk.Metadata.EntityMetadata.get_IsStateModelAware()'.
>   at Microsoft.Crm.MetadataService.Sdk.TypeMaps.PlatformToXrmEntityMetadataTypeMap.InitializeMap()
>   at Microsoft.Crm.MetadataService.Sdk.TypeMaps.PlatformToXrmEntityMetadataTypeMap..cctor()
>   --- End of inner exception stack trace ---
>   at Microsoft.Crm.MetadataService.Sdk.TypeMaps.ExpressionBuilderFactory.CreateDestinationPropertyExpressionBuilder(String metadataEntityName)
>   at Microsoft.Crm.Metadata.Query.SelectFromMetadataCacheStrategy.BuildConditionExpression[T](String metadataEntityName, MetadataConditionExpression condition, ParameterExpression[] parameters)
>   at Microsoft.Crm.Metadata.Query.SelectFromMetadataCacheStrategy.BuildFilterExpression[T](String metadataEntityName, MetadataFilterExpression filter, ParameterExpression[] parameters, Int32 depth)
>   at Microsoft.Crm.Metadata.Query.SelectFromMetadataCacheStrategy.GetFilterExpression[TSource,TDestination](String metadataEntityName, MetadataFilterExpression filters)
>   at Microsoft.Crm.Metadata.Query.SelectFromMetadataCacheStrategy.SetMetadataFilters(String metadataEntityName, MetadataFilterExpression filters)
>   at Microsoft.Crm.Metadata.Query.MetadataQuerySelectVisitor.UpdateStrategyWithQuery(String metadataEntityName, MetadataQueryExpression query)
>   at Microsoft.Crm.Metadata.Query.MetadataQuerySelectVisitor.Visit(EntityQueryExpression query)
>   at Microsoft.Crm.Sdk.Metadata.MetadataServiceProvider.RetrieveMetadataChanges(EntityQueryExpression queryExpression, Nullable`1 filters, String clientVersionStamp, ExecutionContext context, String& serverVersionStamp, DeletedMetadataCollection& deletedMetadata)

Solution

  • i did Repair CRM server from installation.

    This problem no longer exist.