I was able to identify / solve this error on my end. Maybe it will help someone today...
In my case I notice that this error triggers for both Firestore.write and Firestore.query api methods. I can say that for the Firestore.query error happened simply because one of my docs contained a key which it's value was an empty array e.g: my_key: []
I'm pretty sure the Firestore.write api error triggered for the same reason.
Once I removed/handled this key the error was gone.
I hope this would help someone.