Milestone connection issue

I’ve been seeing the following error when trying to connect to a milestone camera:

MIP: Error: ImageViewerWpfControl.CameraFQID ():Exception source: VideoOS.Platform.SDK.UI

Exception type: VideoOS.Platform.MIPException

Exception message: Server not found in configuration

Exception target site: set_CameraFQID

at VideoOS.Platform.SDK.UI.PlatformImageViewerWpfControl.set_CameraFQID(FQID value)

this error only occurs on the first attempt, upon closing the window and relaunching without exiting the application I am able to connect and view the camera feed

the error is thrown when trying to set the FQID like so

new FQID(this.CameraId);

where CameraId is a string that contains the camera FQID

Could you please help me pinpoint the source of this error?

We assume that there might be a timing issue and configuration might be not loaded correctly. Can you please provide a small sample for reproducing the same error that you mentioned?

CCTVViewPopOutNew linkedCameraTileView = new CCTVViewPopOutNew();
        linkedCameraTileView.IsSharedControlsVisible = true;       
 linkedCameraTileView.RowCount = cellCount;
        linkedCameraTileView.ColumnCount = cellCount;
        linkedCameraTileView.CameraBoxes = new ObservableCollection<CameraModel>(cameras);
        linkedCameraTileView.Show();

where CameraModel is an object that contains the camera details such as FQID and ServerId as strings.

Upon opening the window I am iterating over the collection of cameras and initializing a milestoneImageViewer with the associated details.

The PopoutNew object is a WPF window

Thank you for the code, but sorry, can you please provide an application for reproducing the issue? Because we cannot see the issue with the code.

that might be difficult since even I am having trouble reproducing it outside of the specific project.

I have the same code in other projects within the same solution with no issues, it’s only a specific project that is throwing this error.

Could you tell me the potential causes of the error message I shared?

What do you mean by timing issue?

The timing could pertain to how the plugin is loaded.

One example is loading of properties in the Event Server BackgroundPlugin class, please read here: https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_background_1_1_background_plugin.html&tree=tree_search.html?search=configuration+changed

This could actually be the answer for your observation. If it does not fit please outline in what environment your plugin runs and whether it runs on start-up, on event, timed or on user action?

This information might help us but ideally you could give us a mini project we could use to reproduce the issue in the Milestone test lab, that is the background for our request above.