ConfigurationService.GetChildren not working

We have a MIP plugin which is installed into the Management Client. In the plugin we take the existing rules with the following code snippet:

ConfigurationService.GetChildren(EnvironmentManager.Instance.CurrentSite.ServerId, "/RuleFolder")

It was tested and was working with Milestone Professional 2022 R2. We installed a new version Coorporate 2023 R2 and is not working anymore. It throws an exception

MIP: UFilterLicenceHandler () - VideoOS.Platform.Proxy.RestApi.ConfigApiRelated.ResourceNotFoundException: Unknown resource: Unknown
   at VideoOS.Platform.Proxy.RestApi.ConfigApiRelated.NameConvert.ResourcePluralToItemType(String resourceName, Boolean throwForInvalid)
   at VideoOS.Platform.Proxy.RestApi.RestApiConvert.SetValuefrom(String callerItemType, Property property, String field, JsonObject resource, JsonObject definitions, Boolean isPath)
   at VideoOS.Platform.Proxy.RestApi.RestApiConvert.ConstructProperties(String itemType, String id, JsonObject resource, JsonObject definitions)
   at VideoOS.Platform.Proxy.RestApi.RestApiConvert.ConvertToConfigurationItem(JsonObject resource, String callerItemType, JsonObject tasks, JsonObject definitions, Boolean fromInvoke)
   at VideoOS.Platform.Proxy.RestApi.RestApiClientDecorator.GetChildItems(String path)
   at VideoOS.Platform.ConfigurationItems.ConfigurationService.GetChildren(ServerId serverId, String path)
   at UFilter.UFilterLicenceHandler.CollectAffectedCameras(CancellationToken cancellationToken) in <...>

What could be the problem and can we overcome it?

Milestone Development will start an investigation..

@Bo Ellegård Andersen (Milestone Systems)​ Do you have any update on this? Or any estimation when can we expect any update on it?

The investigation will start this week or the next according to the current plan, I cannot say if there will be an immediate workaround or fix but we should get wiser when investigation has started. I will keep you updated..

Hello @Bo Ellegård Andersen (Milestone Systems)​

It turns out that with 2023 R2 Express+ everything works as expected. We suspect that only the Corporate version is not working. Is there any difference in the API depending on Corporate version?

Now we will test with 2022 R2 Corporate. I will keep you updated with the results.

There is a small difference in user roles and permissions when comparing XProtect Express+ and Corporate, but this cannot alone explain this issue!

We tried to reproduce the issue but had no luck.

When testing are you using a user that belongs to the Administrators role in XProtect? If not, please try, does it make a difference?

Do you have other plugins installed that might interfere? Perhaps try to remove or disable all others and try with your plugin alone.

If you have ideas why we might not be able to reproduce please share?

On the server where this fails, if you run the Config API Client sample, does it fail looking into rules?

Hi!

First I will answear your questions:

  • yes we use admin role in xprotect
  • no other plugins are installed
  • using the ConfigApi Client sample I could list the rules with no problems. Just a note: the API call which I provided is a static method, however in the ConfigApi Client there is an instantiation of a client.

Some further results from the investigation:

  1. I installed a new Windowst and installed the 2022 r3 Professional+. It was working. After that I installed the 2023 r2 Corporate which was not working. I reinstalled it but before the reinstallation I dropped the DB and installed to db of the new milestone to another location than [C:\MediaDatabase](file:C:/MediaDatabase)
DROP DATABASE Surveillance, Surveillance_IDP, Surveillance_IM, SurveillanceLogServerV2 ;  

After this the 2023 r2 Corporate was also working fine.

  1. We are using AD users.

Could you let me know about the small difference in user roles and permissions when comparing XProtect Express+ and Corporate? Do you have any ideas what could be wrong?

We have had a second go at trying to reproduce the issue (doing a upgrade scenario like you describe), again we were not able to.

We are not sure how to interpret the remark about the static method. Can you please share some more code so that we understand this? And equally important in what class in the MC plugin and when is this executed?

To answer your question, XProtect Corporate has a differentiated admin rights feature, in essence this means that in Corporate you can have an admin role that can do some administration tasks and not others, in the other product versions there is only one admin role that allows for configuration of all. We are no way sure it plays a factor here, hopefully we will later find the root cause of what you experience and be able to understand.