Management Server 2023R3 methods throw exceptions

In 2019 I developed a method that asks the MS for the logged in User’s information, including whether they have an Administrative role. It has always worked with all revisions but with the 2023R3 there is a problem.

When you try to access any MS method, the exception shown below is thrown; in my method it happens when I try to read roles:

ManagementServer ms = new ManagementServer(EnvironmentManager.Instance.MasterSite);
var roles = ms.RoleFolder.Roles;

Exception details:

VideoOS.Platform.Proxy.RestApi.ConfigApiRelated.ResourceNotFoundException
  HResult=0x80131500
  Messaggio=Unknown resource: stateGroups
  Origine=VideoOS.Platform
  Analisi dello stack:
   in VideoOS.Platform.Proxy.RestApi.ConfigApiRelated.NameConvert.ResourcePluralToItemType(String resourceName, Boolean throwForInvalid)
   in VideoOS.Platform.Proxy.RestApi.RestApiClientDecorator.GetChildItems(String path)
   in VideoOS.Platform.Proxy.ConfigApi.ConfigurationApiItemWrapper.Children()
   in VideoOS.Platform.ConfigurationItems.ManagementServer.get_RoleFolder()
   in VideoMIPExport.UserInfo.GetLoginData() in C:\Users\Frediano\Documents\Visual Studio 2022\Projects\VideoMIPExport\VideoMIPExport\Helpers\UserInfo.cs: riga 93
 
  Questa eccezione è stata generata in origine nello stack di chiamate seguente:
    VideoOS.Platform.Proxy.RestApi.ConfigApiRelated.NameConvert.ResourcePluralToItemType(string, bool)
    VideoOS.Platform.Proxy.RestApi.RestApiClientDecorator.GetChildItems(string)
    VideoOS.Platform.Proxy.ConfigApi.ConfigurationApiItemWrapper.Children()
    VideoOS.Platform.ConfigurationItems.ManagementServer.RoleFolder.get()
    VideoMIPExport.UserInfo.GetLoginData() in UserInfo.cs

What is changed?

Many Thamks,

Frediano

We have discovered this bug recently.

Fixed an issue where deleted events were causing ConfigAPI rule engine to fail

There is a workaround which is to go through all your rules and make sure none of the rules include ‘unknown or deleted device’.

Better yet! There is also a fix..

https://supportcommunity.milestonesys.com/KBRedir?art=000056000&lang=en_US

https://supportcommunity.milestonesys.com/KBRedir?art=000056001&lang=en_US

If your integration is not a plugin but a standalone MIP SDK based application please copy the VideoOS.Platform.dll to the folder from where you execute.

There is right now a test server where the fix doesn’t work, this is under investigation, but for that reason if you can give feedback if the fix works for you it will be appreciated.

Bo,

with yesterday’s hotfixes the problem was not resolved, on the contrary using the system dll everything works fine

Many Thanks,

Frediano

I don’t catch what you are saying. If you do not apply any fixes does the 2023R3 work fine?

Do you have a plugin or a standalone? If plugin, where (Smart Client, Management Client, Event Server)?

I believe the deciding factor is the version of the MIP SDK if you are in standalone, and it does not matter what version of XProtect VMS you connect to, if you experience anything that contradicts this let me know..

Sorry, I forgot to give you this information:

  • SDK version is 2023R1
  • it is Component Integration

I removed yesterday’s hotfixes and replaced the dll 23.3.44.1 with 23.3.25.1 in the installation folder, the method still works fine, so on my machine the hotfixes do not solve the problem

I am sorry. To me “the method still works fine” and “hotfixes do not solve” is a contradiction. Please explain.

Please note that you should not take a dll from 2023R3 if you use the 2023R1 MIP SDK, please take the one from the 2023R1 patches if using 2023R1.

What we recommend is that you use the newest MIP SDK always.

Bo,

I have more than one customer using this method, one of whom updated the Platform to the latest version and the Application stopped working. This can of course happen again.

I installed all the 2023R3 hotfixes but they don’t solve the problem.

I copied VideoOS.Platform.dll from the Milestone folder to the Application folder and that solved the problem.

While waiting for a hotfix that really solves the problem, I’m happy with this workaround.

I referred you to the hot-fixes. In doing so I have referred to something that will not work, not without extra explanation from me and extra work from you.

The fix results in a new VideoOS.Platform.dll.

Milestone have created hot-fixes / patches for Smart Client, Management Client and Event Server, so that they have a new VideoOS.Platform.dll. These patches have furthermore been built in versions 2023R1, 2023R2 and 2023R3. The conclusion is that for all plugins all hosting environments for all versions have been fixed.

When you build a standalone application based on the MIP SDK you get the VideoOS.Platform.dll from the NuGet while building. This one has not updated by Milestone Development!

The workaround is exactly what you mention, deploy a patch and then copy the VideoOS.Platform.dll to your standalone application, this is not ideal but it is the workaround.

I recommend, build your standalone application using the newest NuGet and copy the VideoOS.Platform.dll from the 2023R3 patches.

Please note that the fix will be in 2024R1, both plugin environments and NuGets.