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
2
Answers
Probably similar question to Firestore (9.6.6): Connection WebChannel transport errored:
According to @Kingsley
Initialize your firestore by doing:
This was already answered on Github
But for everyone new struggling with this Error, try this:
instead of this:
Seems like some routers get a HTTP 418: I’m a teapot response.
Also always check https://debug-my.firebaseapp.com.
If anyone still struggles, I am open for help.