Closed MichaelSolati closed 4 years ago
I'm having the same issue
Thanks for the bug report. Unfortunately, I cannot reproduce this issue locally. At first, I tried using Friendly Eats, which is in JavaScript. When that didn't work out, I downloaded the Stackblitz project you linked and ran it with ts-node
:
{
posts: [
DocumentReference {
_key: [DocumentKey],
firestore: [Firestore],
_converter: undefined,
_firestoreClient: [FirestoreClient]
}
],
coordinates: GeoPoint { _lat: 0, _long: 0 }
}
I cannot debug the issue on Stackblitz. Would it be possible for you to prepare a repro case that can be run locally? I have a suspicion that the error is caused by something in the setup/environment (if it were within the SDK itself, it would have probably been reproduced on FriendlyEats). Does this issue happen outside of Stackblitz?
Thanks for the bug report. Unfortunately, I cannot reproduce this issue locally. At first, I tried using Friendly Eats, which is in JavaScript. When that didn't work out, I downloaded the Stackblitz project you linked and ran it with
ts-node
:{ posts: [ DocumentReference { _key: [DocumentKey], firestore: [Firestore], _converter: undefined, _firestoreClient: [FirestoreClient] } ], coordinates: GeoPoint { _lat: 0, _long: 0 } }
I cannot debug the issue on Stackblitz. Would it be possible for you to prepare a repro case that can be run locally? I have a suspicion that the error is caused by something in the setup/environment (if it were within the SDK itself, it would have probably been reproduced on FriendlyEats). Does this issue happen outside of Stackblitz?
I don't think it's a ts-node/StackBlitz specific issue... 😕
I've included a suuuper simple repo and have it running on GH Pages, the issue seems to persist.
Thank you! I can reproduce it now, will investigate further.
This is a regression introduced in 7.14.2
. Thanks a lot for helping us catch it quickly!
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
Add a document to Firestore (
doc1
) with a GeoPoint set to0, 0
, take a reference to the added document (doc1
) and add it as field in an array to a new document (doc2
) as well as a GeoPoint set to0, 0
. Query for the second document (doc2
) and try to get thedata()
of it. It will throw an error saying:FirebaseError: [code=invalid-argument]: Function GeoPoint() requires its first argument to be of type number, but it was: undefined
.However if you change the coordinates to
1, 1
there is no issue what so ever!Relevant Code:
https://stackblitz.com/edit/firebase-js-sdk-3006?file=index.ts
Update, if any field of the
GeoPoint
is0
this issue occurs.