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
When querying a single document using onSnapshot the document and exists property is undefined. Using get instead of onSnapshot works fine. Using onSnapshot on collection works fine too.
firestore().collection('Users').doc(userId).onSnapshot(snapshot=> {
// these are both undefined
console.log(snapshot.exists)
console.log(snapshot.data())
})
--
Platform that you're experiencing the issue on:
iOS
Android
iOS but have not tested behavior on Android
Android but have not tested behavior on iOS
Both
react-native-firebase version you're using that has this issue:
The text was updated successfully, but these errors were encountered:
FoodlyEric
changed the title
[v6] 🔥Firestore onSnapshot on a single document is always undefined
🔥[v6] Firestore onSnapshot on a single document is always undefined
Aug 6, 2019
Issue
When querying a single document using onSnapshot the document and exists property is undefined. Using
get
instead ofonSnapshot
works fine. UsingonSnapshot
on collection works fine too.--
Platform that you're experiencing the issue on:
react-native-firebase
version you're using that has this issue:"@react-native-firebase/app": "^0.1.2",
"@react-native-firebase/auth": "^0.1.2",
"@react-native-firebase/firestore": "^0.1.2",
"react": "16.8.6",
"react-native": "0.60.4",
The text was updated successfully, but these errors were encountered: