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
Instead of using getFirestore use initializeFirestore. Set useFetchStreams to true.
Relevant Code:
constfirebaseApp=initializeApp(firebaseConfig);constfirestore=initializeFirestore(firebaseApp,{useFetchStreams: true,// commenting out this line works});addDoc(collection(firestore,"cities"),{name: "Tokyo",country: "Japan",}).then(console.log).catch(console.error);
Just to cover all possibilities, I tried using experimentalForceLongPolling as suggested here: #4859, which didn't work
@schmidt-sebastian Do you want to add useFetchStream to FirestoreSettings? It currently is not exposed in our typings.
Or do you want to change to use fetch by default?
[REQUIRED] Describe your environment
I am currently using ReactJS 17 and NextJS 10. I don't believe these are contributing to the issue.
[REQUIRED] Describe the problem
Using
useFetchStreams
results in the following error:{ "type": "c", "target": { ... }, "defaultPrevented": false, "status": 1 }
Steps to reproduce:
Instead of using
getFirestore
useinitializeFirestore
. SetuseFetchStreams
totrue
.Relevant Code:
Just to cover all possibilities, I tried using
experimentalForceLongPolling
as suggested here: #4859, which didn't workThe text was updated successfully, but these errors were encountered: