I’m trying to store data at firestore collection but getting this error again and again unable to store data on my messages collection.
@firebase/firestore: Firestore (10.12.3): WebChannelConnection RPC 'Write' stream 0x401c795e transport errored
await addDoc(collection(db, "messages"), {
text: value,
name: username,
createdAt: serverTimestamp(),
uid
})
I want to store messages data to firestore
Aniket Bhosale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Probably similar question to Firestore (9.6.6): Connection WebChannel transport errored:
According to @Kingsley
Initialize your firestore by doing:
const app = initializeApp(firebaseConfig);
export const db = initializeFirestore(app, {
experimentalForceLongPolling: true,
useFetchStreams: false,
});
Ezra Magbanua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.