Hello,
08-20 12:31:42.660 E/mono (24148): Unhandled Exception: 08-20 12:31:42.660 E/mono (24148): System.ArgumentException: Handle must be valid. 08-20 12:31:42.660 E/mono (24148): Parameter name: instance 08-20 12:31:42.660 E/mono (24148): at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00009] in <42748fcc36b74733af2d9940a8f3cc8e>:0 08-20 12:31:42.660 E/mono (24148): at Android.Runtime.JNIEnv.CallBooleanMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x0000e] in <227a96d68a0440cea172be41b1306654>:0 08-20 12:31:42.660 E/mono (24148): at Java.Util.IIteratorInvoker.get_HasNext () [0x00033] in <227a96d68a0440cea172be41b1306654>:0 08-20 12:31:42.660 E/mono (24148): at System.Linq.Extensions+<ToEnumerator_Dispose>d__5`1[T].MoveNext () [0x00063] in <227a96d68a0440cea172be41b1306654>:0 08-20 12:31:42.660 E/mono (24148): at System.Linq.Enumerable+SelectIListIterator`2[TSource,TResult].MoveNext () [0x00029] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Linq/src/System/Linq/Select.cs:487 08-20 12:31:42.660 E/mono (24148): at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1037 08-20 12:31:42.660 E/mono (24148): at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x0000d] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1370 08-20 12:31:42.660 E/mono (24148): at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:968 08-20 12:31:42.660 E/mono (24148): at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:910 08-20 12:31:42.660 E/mono (24148): at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1341 08-20 12:31:42.660 E/mono (24148): at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:899 08-20 12:31:42.660 E/mono (24148): at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1261 08-20 12:31:42.662 E/mono-rt (24148): [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: Handle must be valid. 08-20 12:31:42.662 E/mono-rt (24148): Parameter name: instance 08-20 12:31:42.662 E/mono-rt (24148): at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00009] in <42748fcc36b74733af2d9940a8f3cc8e>:0 08-20 12:31:42.662 E/mono-rt (24148): at Android.Runtime.JNIEnv.CallBooleanMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x0000e] in <227a96d68a0440cea172be41b1306654>:0 08-20 12:31:42.662 E/mono-rt (24148): at Java.Util.IIteratorInvoker.get_HasNext () [0x00033] in <227a96d68a0440cea172be41b1306654>:0 08-20 12:31:42.662 E/mono-rt (24148): at System.Linq.Extensions+<ToEnumerator_Dispose>d__5`1[T].MoveNext () [0x00063] in <227a96d68a0440cea172be41b1306654>:0 08-20 12:31:42.662 E/mono-rt (24148): at System.Linq.Enumerable+SelectIListIterator`2[TSource,TResult].MoveNext () [0x00029] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Linq/src/System/Linq/Select.cs:487 08-20 12:31:42.662 E/mono-rt (24148): at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1037 08-20 12:31:42.662 E/mono-rt (24148): at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x0000d] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1370 08-20 12:31:42.662 E/mono-rt (24148): at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:968 08-20 12:31:42.662 E/mono-rt (24148): at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:910 08-20 12:31:42.662 E/mono-rt (24148): at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1341 08-20 12:31:42.662 E/mono-rt (24148): at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:899 08-20 12:31:42.662 E/mono-rt (24148): at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1261
Method:
if (querySnapshot != null) { lastVisibleDocument = querySnapshot.Documents.LastOrDefault(); ** foreach (var documentChange in querySnapshot.DocumentChanges) this line gives an error ** { Message message; switch (documentChange.Type) { case DocumentChangeType.Added: message = documentChange.Document.ToObject<Message>(); __** var user = await Search(message.FromId); has to do with await**__ message.FromName = user.Name; List.Add(message); break; case DocumentChangeType.Modified: break; case DocumentChangeType.Removed: break; } } }
this piece of code is from a delegate, how can I fix it?