Stream xxxxx-xxxx request error: code 19

Hi, occasionally I received a stream request error via the error callback with an error code of 19, together with an empty message field, when calling the XPMobileSDK.requestStream method. I checked the appendix documentation, according to the appendix, and error code of 19 refers to a security error. My application managed to connect to the mobile server successfully. What could be the issue?

Hi Clonton Tan,

What SDK are you using? .Net or Web?

From your other questions, I understand that you use the js SDK. So my next question is do you have challenges enabled? This error occurs only if challenge check fails.

Hi Tsvetomira Petkova Georgieva, thanks for the reply, I’m using the Web SDK.

At the moment, I configured my application to login via the XPMobileSDK.login method which accepts the username and the password only. Just to be sure, how do I enable challenges?

Sorry, I’m still pretty new to this.

Hi Clinton,

It should work and by default challenges are enabled.

Could you try to disable them ?

Just set

XPMobileSDK.library.Connection.CHAPSupported = ‘No’;

Before calling connect and login methods.

Btw what is the Mobile server version ?

Is it 12.1 (2018 R1) ?

Hi Petar, yes the Mobile server is version 12.1.

I tried disabling the CHAPS, however this time it just floods with the same error code 19. I suppose when ever it requests a frame, it throws the error as CHAPS is disabled right?

Hm, That’s really strange.

There is bug in 12.1 and XPMobileSDK.Login doesn’t work pretty well.

XPMobileSDK.login from the other hand should work.

It is used in the build in JS sample in the Mobile server.

Could you check if the sample is working on your side ?

It could be accessed at the “http://<mobile_server_address>:<mobile_server_port>/XPMobileSDK/Samples/sample.html”.

By default the page is not rendered but downloaded, so you have to enable the sample doing one trick in the Mobile server.

It is described how to do it in:

http://doc.developer.milestonesys.com/mipsdkmobile/

(“Web” tab, “Login and show steams”, “Host the sample on XProtect Mobile Server”).

btw. where are you hosting your web application ?

It is directly under the Mobile server or you are using separate one ?

In case of separate you’ve copied the whole “XPMobileSDK” folder, right ?