f-miyu / Plugin.CloudFirestore

MIT License
121 stars 44 forks source link

Object Reference error when using AddAsync() #78

Open akuteru opened 3 years ago

akuteru commented 3 years ago

I am always encountering this error when I am using the AddAsync method. But the weird thing is, currently I only get it when I am adding document to a certain Collection.

Here is the code: image

Here is my model setup image

here is the error warnings I am getting after triggering the AddAsync in the Output window image

I cant seem to pinpoint what is the problem. Can anyone tell me? Is there something wrong with how I map or setup my model?

I tried it with all the properties filled out and it still throws an object reference error so I am a little confused at what's wrong.

angelru commented 3 years ago

With SetAsyncthe same thing happens to you?

akuteru commented 3 years ago

With SetAsyncthe same thing happens to you?

I havent tried using SetAsync. Do you have some idea how can i replicate or generate a document ID like how the firebase does it with AddAsync?

angelru commented 3 years ago

CrossCloudFirestore.Current.Instance.Collection("randomPath").Document().Id;