You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a FirestoreObject that causes a NullReferenceException deep in Firestore code during serialization for SetDataAsync. Statckrace is below.
The crash occurs in the following spot at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.NSObjectExtensions.ToNSObject where @this is null.
public static NSObject ToNSObject(this object @this)
{
switch (@this)
and then crashes further on in the method when it hits this line: interpolatedStringHandler.AppendFormatted<Type>(@this.GetType());
The same thing happens whether the call is batched or not, in case that matters. Any ideas? Thanks in advance!
System.NullReferenceException: Object reference not set to an instance of an object.
at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.NSObjectExtensions.ToNSObject(Object this)
at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.ListExtensions.ToNSArray(IList this)
at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.NSObjectExtensions.ToNSObject(Object this)
at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.DictionaryExtensions.ToDictionary(Object this)
at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.NSObjectExtensions.ToNSObject(IFirestoreObject this)
at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.NSObjectExtensions.ToNSObject(Object this)
at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.DictionaryExtensions.ToDictionary(Object this)
at Plugin.Firebase.Firestore.Platforms.iOS.WriteBatchWrapper.SetData(IDocumentReference document, Object data, SetOptions options)
--- user code
The text was updated successfully, but these errors were encountered:
A little bit more info on this one... This happens if there is an IList property within an IFirestoreObject that is in turn a property witihn an IFirestoreObject (see code below). We have had trouble in multiple places with our hierarchical data model that were not a problem previously with Plugin.Firestore.
public class ClassA : IFirestoreObject
{
[FirestoreProperty("classb")] public ClassB { get; set; }
}
public class ClassB : IFirestoreObject
{
[FirestoreProperty("strings")] public IList<string> Strings { get; set; }
}
We have a FirestoreObject that causes a NullReferenceException deep in Firestore code during serialization for SetDataAsync. Statckrace is below.
The crash occurs in the following spot at
Plugin.Firebase.Firestore.Platforms.iOS.Extensions.NSObjectExtensions.ToNSObject
where@this
is null.and then crashes further on in the method when it hits this line:
interpolatedStringHandler.AppendFormatted<Type>(@this.GetType());
The same thing happens whether the call is batched or not, in case that matters. Any ideas? Thanks in advance!
The text was updated successfully, but these errors were encountered: