Plugin causes error "Duplicate, KindId already exists" in XProtect 2018 R3

We have XProtect Plugin that is installed both in Event Server and Management Client. It has several ItemManagers with unique KindId. There were no issues in installing and running it in XProtect 2018 R1. But when we install this plugin in 2018 R3 a message box error and XProtect log error occurs:

2019-02-01 16:58:50.155+03:00 [     1] ERROR      - MIP: InitItemManagers () - Duplicate, KindId already exists - 252c9078-923e-4e22-a207-f7b7c5b87d2d
2019-02-01 16:58:50.157+03:00 [     1] ERROR      - ......ArgumentMIPException:Duplicate, KindId already exists - 252c9078-923e-4e22-a207-f7b7c5b87d2d   at VideoOS.Platform.Proxy.ConfigApi.ConfigurationApiItemWrapper.ExecuteMethod(String methodId)
   at VideoOS.Platform.ConfigurationItems.MIPKindFolder.AddMIPKind(String id, String name, String pluginId, String pluginName, String kindType, Boolean displayOnGisMap, Guid parentKind, String securityAction)
   at VideoOS.Administration.AddIn.XPCOConfiguration.EnsureMIPKindUpdated(ItemNode itemNode, PluginDefinition pluginDefinition, ICollection`1 allMipKinds, Boolean isAdmin)
   at VideoOS.Administration.AddIn.XPCOEnvironmentManager.InitAllItemManagers(List`1 itemNodes, PluginDefinition pluginDefinition, ICollection`1 allMipKinds, Boolean isAdmin)
2019-02-01 16:58:50.157+03:00 [     1] ERROR      - ......InnerException:FaultException`1:Duplicate, KindId already exists - 252c9078-923e-4e22-a207-f7b7c5b87d2d
Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
 
Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at VideoOS.ConfigurationApi.ClientService.IConfigurationService.InvokeMethod(ConfigurationItem item, String method)
   at VideoOS.Platform.Proxy.ConfigApi.ConfigurationServiceClientDecorator.<>c__DisplayClass15_0.<InvokeMethod>b__0(ConfigurationServiceClient client)
   at VideoOS.Platform.Proxy.ConfigApi.ConfigurationServiceClientDecorator.CallWithRetry[TResult](Func`2 call)
   at VideoOS.Platform.Proxy.ConfigApi.ConfigurationApiItemWrapper.ExecuteMethod(String methodId)

This error occurs only one time after installation in Event Server and one time after Management Client launch. It does not affect the work of the plugin. And to reproduce it we need to reinstall XProtect completely and install out the plugin again.

This error is thrown for 3 out of 9 ItemManagers only, but we can’t spot the difference. And we have no issues with similar plugin that has 4 another ItemManagers.

This is a bit of a mystery. We have not been able to reproduce it.

Looking at the code it seems like the only way this can happen is if multiple ItemNode’s has the same kind id. Is there any chance that this is somehow the case?

No, they have unique kind id. And, by the way, this is not reproduced in XProtect 2019 R1

Hmm that is strange. Is there any way you can provide a sample that reproduce the issue, so that we can investigate? As we have not been able to reproduce with the plugins we have it is a bit difficult to get any furter.