-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@firebase/firestore: Firestore (5.5.9): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds. #1457
Comments
I found a few problems with this issue:
|
I have the same error. |
I think there's a known incompatibility with react-native-fetch-blob. See wkh237/react-native-fetch-blob#634 and the workaround suggested here. I would comment on that issue (or maybe open a new one since that one is closed), as I think this is ultimately a problem with react-native-fetch-blob. |
This is what I did and it worked for me: First store Now for RN Fetch Blob, use it's settings Then just before making your Firestore call - replace Hope this would help! |
You should verify your proxy and/or firewall ports because firebase uses websockets. |
I have a react native app that uses Firebase/firestore. For uploading images, I am using "react-native-fetch-blob" to create a Blob.
I am trying to fetch doc from firestore, but my app is blocked and not getting any response from firestore (not catch / nothing => just passing thru the code).
Is there anything I can do for getting docs from firestore?
Below is my code
import firebase from "../../../firebaseConfig";
import RNFetchBlob from "react-native-fetch-blob";
// Prepare Blob support
window.XMLHttpRequest = RNFetchBlob.polyfill.XMLHttpRequest;
const Blob = RNFetchBlob.polyfill.Blob;
const fs = RNFetchBlob.fs;
window.Blob = Blob;
const originalXMLHttpRequest = window.XMLHttpRequest;
const originalBlob = window.Blob;
var firebaseUid = "";
componentDidMount = async () => {
firebaseUid = await firebase.auth().currentUser.uid;
this.getMyStory();
};
getMyStory = async () => {
window.XMLHttpRequest = originalXMLHttpRequest;
window.Blob = originalBlob;
var docRef = await firebase
.firestore()
.collection("demo")
.doc(firebaseUid)
.collection("ArrayDoc");
docRef
.get()
.then(querySnapshot => {
querySnapshot.forEach(doc => {
console.log(doc.id, " => ", doc.data());
});
})
.catch(error => {
console.log("error", JSON.stringify(error));
});
};
The text was updated successfully, but these errors were encountered: