.NET error for User Login?

Trying to login and authenticate a user via C# commands in Unity, and running into an error…
I’m using the GitHub repo from Japan in lieu of a Backendless SDK at the moment, but getting this error:

BackendlessException: Type System.Object can't act as an array

When trying to run this code in the app:

 Dictionary<string, object> requestData = new Dictionary<string, object>();
 requestData.Add("login", login);
 requestData.Add("password", password);
 HandleUserLogin(Invoker.InvokeSync<Dictionary<string, object>>(Invoker.Api.USERSERVICE_LOGIN, new object[] { requestData }));

I’ve followed the methods back and forth, and the code seems to be passing the appropriate data to the login function, but it continues to spit back this same error each time.

Hi Nathaniel,

Could you try this instead?:

Backendless.UserService.Login( login, password )

Regards,
Mark

Hello,

our team also encountered this nasty little error and this thread was the only Google hit from it. For the future reference, this error is caused by the Unity SDK’s BackendlessUser class not recognizing the relations in the database. So if you have any relations in the Users table, the error emerges when login function tries to map the related table values to the BackendlessUser object. As far as we know, the error can be resolved only by removing the relations from Users table.

Regards,
Larri J