Mobile SDK Login Errors - VideoOS.Mobile.Portable.Encryption.DHEncryption.Encrypt

We are experiencing

at VideoOS.Mobile.Portable.Encryption.DHEncryption.Encrypt (System.String text) [0x00000] in :0

at VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection.LogIn (System.String username, System.String password, System.String clientType, VideoOS.Mobile.Portable.VideoChannel.Params.LoginParams loginParams, VideoOS.Mobile.SDK.Portable.Server.Interfaces.OnResponse`1[T] onSuccess, VideoOS.Mobile.SDK.Portable.Server.Interfaces.OnResponse`1[T] onFail) [0x00028] in <00b74a41969042fe8a03bb573a18f29e>:0

at VideoOS.Mobile.SDK.Portable.Server.Base.Connection.Connection+d__1.MoveNext () [0x0000a] in <00b74a41969042fe8a03bb573a18f29e>:0

System.NullReferenceException in method Connection.LogInAsync(username, password, ClientTypes.MobileClient, loginParams, MaxTimeout)

Due to this exception, the connection to milestone server failed. This reconnection is required to keep the video playing, and to prevents the bug with stopping video which we experience. Our connection object and all parameters in method have correct values.

This seems to only happen after we have ALREADY logged in succesfully. This happens on logins after the initial.

Hi Josh,

This exception could usually happens on two situations:

  • VideoOS.Mobile.SDK.Environment.Instance.Initialize(); is not called.

This is probably not your case, as you where able to login the first time and you are not on the second.

  • LogIn is called without to be called Connect first.

When you try to reconnect you are doing following sequence, right ?

  1. Create new Connection object.
  2. Call Connect() of the connection object.
  3. Call LogIn() of the connection object.

Another thing you could check - the result of the Connect command. A suppose you are using ConnectAsync() method. Is it possible the initial connect command to be timeout-ed ? This will have the same behavior as Connect is not called at all, as encryption is not initialized from the connect response.

“Sometimes we experience ErrorCode.NotAllowedInThisState response in method Connection.ConnectAsync. What are the possible reasons for this error?”

Hi Josh,

It could happen when “Connect” is called twice.

Connection to the MoS is most probably in state when is “Connected” and waiting for “Login” or “LogedIn” and waiting for regular commands.