I am working in React implementation and when connecting with connectionID, this error occurs.
Hi Monika,
In order to help we need to at least understand what you’re trying to achieve.
Can you please provide some more useful info? This might be some code sample and/or WireShark capture.
Regards,
Nikolay
Okay, I will try to make it as straightforward as possible, I get this error when connected with connection ID after I click on the camera to start the video. Also, I should mention that I am using Typescript and all of the XPMobileSDK files are in the public folder outside of the bundled code. And I am using MIPSDKMobile_2019R2. If I use login and not connectionId, everything works fine.
function initialize() {
if (!/^http/.test(url)) {
url = "http://" + url;
}
XPMobileSDKSettings.MobileServerURL = url;
let observer = {
connectionDidConnect: connectionDidConnect,
connectionDidLogIn: connectionDidLogIn,
};
XPMobileSDK.addObserver(observer);
XPMobileSDK.connect(url);
}
function connectionDidConnect() {
let connectionId = localStorage.getItem(vmsName);
if (!connectionId) {
getting from API connection ID
}
const connection = XPMobileSDK.connectWithId(url, connectionId);
if (!connection) {
if old getting new connection ID from API
XPMobileSDK.connectWithId(url, newConnectionId);
}
}
It looks like some code is looking for SupportNoScaledImages parameter which in your case is missing, but I don’t really know why (because it’s no longer used. It has been removed some time ago). Could it be that you’re using XPMobileSDK version 2019R2 to access a Mobile server with higher version?
What is your XProtect version (Management server) and Mobile server version?
yes it is higher,
Milestone XProtect VMS Products 2022 R1
Please upgrade your SDK to 2022 R1 as well. Issue should be resolved there.
SDK version should be the same as Mobile server version. Otherwise various things may go wrong (though most of the features will work fine)
Maybe you could provide an example of how to connect with connectionID in the 2022R1 version in JS?
Sorry for the delay. There’s still a bug in the latest version of the SDK, so RequestStream command fails when you use connectWithId.
We’re currently working to provide you with a hotfix.
Look at this forum thread for more info.
Hi Monika,
I made a hotfix of the JS SDK. You can get it from here. Please check if it works for you.
Hey, right now this error does not occur, thank you, thus I can’t get video stream with connection id, getting “No challenges to perform the action” and “No challenges in the list!”. With login everything works just fine.
I don’t think connectWithId is compatible with challenges, you need to disable them.
Please refer to this forum thread (where my colleague Petar explains why relying on https is much more secure than using challenges).
