- Home /
Parse Exception System.AggregateException
Hi
I'm new with parse and I'm getting troubles to integrate the API in my project principal to run any query.
Here is my code:
IEnumerator UpdatePosition()
{
var query = ParseObject.GetQuery ("User").WhereEqualTo("username",usrID.text);
var task = query.FirstAsync ();
while(!task.IsCompleted) yield return null;
if (task.IsFaulted || task.IsCanceled){
Debug.Log("Cannot get the user "+task.Exception.Message);
}else{
ParseObject result = task.Result;
Debug.Log ("===> "+result.Get<string>("parent"));
}
}
Always the code goes to 'task.IsFaulted' and the display is:
Cannot get the user Exception of type 'System.AggregateException' was thrown.
Here I am sure that usrID.text contain a valid username which has just one record and I'm using Unity 5.0.2f1 and Parse 1.5.3
So anyone can give me a light on this
Thank you very much
I'm having plenty of Parse-Unity trouble myself, but what happens if you use FirstOrDefaultAsync ins$$anonymous$$d of FirstAsync?
What does it say after the System.AggregateException? Typically there is something more meaningful below that will point you in the right direction.
Your answer
![](https://koobas.hobune.stream/wayback/20220611231744im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why does SQLite throw InvalidOperationException in Unity 5.3? 1 Answer
Can't Read CSV from Download Folder in Android Device (C# Unity) 1 Answer
Using Parse with Unity and the Parse Initialize Behavior is causing Android Device to crash 0 Answers
First VR experiment: IndexOutOfRangeException: Array index is out of range. 2 Answers
Float.Parse question 1 Answer