I got this error:
@firebase/firestore: Firestore (9.9.0): Could not reach Cloud Firestore backend. Connection failed 1 times.
after chaning my firebase config from
apiKey: "SecretApiKey",
authDomain: "SecretAuthDomain",
[...]
}
to:
const firebaseConfig = {
apiKey: process.env.apiKey,
authDomain: process.env.authDomain,
[...]
}
also I didnt get this error like 2 days ago or when i was making other project with firebase.
I saw that problem on internet and solution was to change to this:
const firestoreDB = initializeFirestore(firebaseApp, {
experimentalForceLongPolling: true, // this line
useFetchStreams: false, // and this line
})
but this doesnt work also for me and i get another error.