import { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";
const firebaseConfig = {
apiKey: "1234",
authDomain: "demo.firebaseapp.com",
projectId: "demo",
storageBucket: "demo.appspot.com",
messagingSenderId: "1234",
appId: "1234",
};
const app = initializeApp(firebaseConfig);
export const db = getFirestore(app);
This is firebase config file.
This is the file we need to get the documents in firebase.
But when I am trying to run this app on my android mobile device using expo go, it is getting an error as below
ERROR [2022-10-28T17:26:06.273Z] @firebase/firestore: Firestore (9.6.11): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate
in offline mode until it is able to successfully connect to the backend.
But my internet connection is working good in my mobile device.
Also I have tried using different firebase versions but still didnt work for me. Can someone help me to fix this error?
I am expecting to get help to connect the firebase to my react native application