因此,我正在关注this doc,以便从android的React Native应用中查询Cloud Firestore。我能够登录我的用户,因此与服务器的交互似乎正常。 但是,在执行以下代码段时,
import auth from "@react-native-firebase/auth";
import firestore from "@react-native-firebase/firestore";
/*other code*/
const user = auth().currentUser;
firestore()
.collection("users")
.doc(user.uid)
.get()
.then((documentSnapshot) => {
console.log("User exists: ", documentSnapshot.exists);
if (documentSnapshot.exists) {
console.log("User data: ", documentSnapshot.data());
}
});
我收到以下错误: