2022 R1(22.1 a) : MissingMethodException for RetrievalTaskManager.Connect()

Hi

We have developed plugin using 21.1.0 (MilestoneSystems.VideoOS.Platform.SDK) library to retrieve recording from the camera.

When we we tested features, it was working as with Milestone XProtect Corporate 2021 R1

but when we try to install same plugins on corporate 2022 R1(22.1 a) RetrievalTaskManager.Connect() giving the error.

Please find details below

************** Outer Exception **************

Exception type:System.MissingMethodException

Exception message:Method not found: ‘Void VideoOS.Management.VmoClient.VmoClient..ctor(VideoOS.Management.VmoClient.ServerConnection)’.

Exception source:VideoOS.Platform.SDK.RemoteRetrievalTasks

Exception Target Site: .ctor

at VideoOS.Platform.SDK.RemoteRetrievalTasks.ManagementServerFacade..ctor(ServerConnection vmoServerConnection)

at VideoOS.Platform.SDK.RemoteRetrievalTasks.RetrievalTaskManager.Connect()

at SafetyVision.RoadRecorders.Client.BrowserMainControl.Init()

at VideoOS.RemoteClient.Application.MIP.PlatformContentHolderWpf.Init()

************** System Info **************

Date and time: 3/15/2022 7:33:52 PM

Machine Name: XXXXXXXXXXXXX

Processors count: 8

OS version: Microsoft Windows NT 6.2.9200.0

64 bit OS: True

64 bit process: True

IP address: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Current user: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Please suggest your feedback

It will give conflicts to add VideoOS.Platform.SDK to Plugin applications as a reference. VideoOS.Platform.SDK is for standalone, you could say that VideoOS.Platform.SDK provides the environment when you do not have a hosting application like the Smart Client.

The RetrievalTaskManager is not implemented in the Smart Client environment only in standalone. You cannot use RetrievalTaskManager on Smart Client plugin.

Hi @Rie Kiuchi (Milestone Systems)​

If RetrievalTaskManager will not work with Smart Client Plugin, then why it is working as expected on Milestone Version XProtect Corporate 2021 R1.

RetrievalTaskManager is only give problem with 2022 R1.

If RetrievalTaskManager not works with Smart Client Plugin, can you please suggest how we can trigger recording retrieval from Smart Client Plugin?

Please suggest

It seems like following link is the same conversation, so shall we continue to have conversation on this post?

https://developer.milestonesys.com/s/question/0D53X00009xDa2xSAC/error-while-retrieval-task-there-has-been-an-unexpected-database-error-please-contact-your-server-administrator

Hi @Rie Kiuchi (Milestone Systems)​,

https://developer.milestonesys.com/s/question/0D53X00009xDa2xSAC/error-while-retrieval-task-there-has-been-an-unexpected-database-error-please-contact-your-server-administrator and this thread are different things.

this thread is related to

When we run the plugin with Milestone 2022 R1(22.1 a), RetrievalTaskManager.Connect() generating the exception but working fine with Milestone 2021 R1

while another thread is when we are calling refresh of retrieval task sometime it throw error on Milestone 2021 R1.

SO this thread is mainly related 21.1.0 (MilestoneSystems.VideoOS.Platform.SDK) library is not working with Milestone 2022 R1

Thank you for the explanation. The reason for generating the exception is the same as we wrote in the first answer - it will give conflicts to add VideoOS.Platform.SDK to Plugin applications as a reference. We have consulted Milestone Development regarding 2021 R1 and they said, it might work with 2021 R1 but this is not what we expected.

Hi @Rie Kiuchi (Milestone Systems)​ ,

If we don’t use VideoOS.Platform.SDK, how we can do retrieval request and check retrieval progress from plugin in Smart Client?

It is not possible to do edge retrieve from a Smart Client plugin (not implemented).

You can build a standalone application or service that can retrieve as a workaround.

@Bo Ellegård Andersen (Milestone Systems)​ thanks for the feedback.

Is there any plan to implemented it?

Can you please also suggest how we can get all cameras into service? as service will not have any milestone server login so how we can get camera item to start the retrieval process ?

We have put this issue as a request on the wish-list for future enhancement development work. A prioritization needs to be made by Milestone Product Management, so it is not possible to say when, or even if, this will be developed.

Thanks @Rie Kiuchi (Milestone Systems)​for feedback,

As per @Bo Ellegård Andersen (Milestone Systems)​ we can implement service as workaround but the question is

How we can get all cameras into service? as service will not have any milestone server login so how we can get camera item to start the retrieval process ?

You can develop a standalone service that does a login to XProtect.

VideoOS.Platform.SDK.Environment.Login - https://doc.developer.milestonesys.com/html/index.html?base=sdkhelp/class_video_o_s_1_1_platform_1_1_s_d_k_1_1_environment.html&tree=tree_search.html?search=environment

The AddLayout sample shows some things that might not be relevant but has the cleanest login code, using code not a login dialog, so it might be worth having a look. https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/addlayout/readme.html&tree=tree_2.html

thanks @Bo Ellegård Andersen (Milestone Systems)​,

Workaround only works if new service start with Machine start.

Our use case is : we have installed Milestone Server on dedicated machine (where we install new service to retrieve the recording). Only few person has access of the server.

In case Machine restart, new service should start automatically without taking any input

Add server will required input from user for credential and on the server it may not have Windows Authentication, it will have basic authentication.

How we can do the login without taking input from the user and start the service on windows start?

True, and if your service does not even start it does not matter that it cannot login.

The service must start otherwise this will not work.

When the service starts it can either use a hardcoded login or you can have the service run as a specific windows user and then use login to XProtect with current credentials.

I guess your Smart Client plugin could start an external service or application (perhaps a command-line console app) and in that way you can workaround if you do not want your service to start automatically.

Hi @Bo Ellegård Andersen (Milestone Systems)​,

Most of the customer are using basic authentication so run service with specific windows user will not solve the problem.

We may not able to hard coded login information.

Can we create the user from any library from Smart Client Plugin?

If yes, can you please share example. we will create the user from Smart client plugin and we will use that user into service.

Yes, we can run external console application but we can not get progress of camera retrieval.

So if possible we will go with service approach only.

The answer is yes, you can create a user using the Configuration API. Please have a look at the Smart Client Add User sample from the newest MIP SDK. https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/adduserwithconfigapi/readme.html&tree=tree_1.html

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

We will try to implement and let you know if we face any problem.

by that time if you got any news about implementation of retrieval for Smart Client Plugin, please let us know.

Regards,