Reputation: 478
I created a project using firebase, cloud functions and firestore as db, but I am getting "Stream removed" error sporadically. This error happens when I am executing the function bellow:
exports.createUser = functions.auth
.user()
.onCreate(event => {
const user = event.data;
const registrationDate = new Date().getTime();
const {uid, email, displayName, photoURL} = user;
const userRelevantInfo = {
...
};
return usersRef.doc(uid).set(userRelevantInfo);
});
Using "setLogFunction" from firestore, this is what gets logged:
Does anyone knows what is happening or how can I fix this?
Upvotes: 1
Views: 556
Reputation: 5126
I had the same issue the last few days. I reported it to Firebase and they have fixed the issue. Update @google-cloud/firestore
to version 0.10.1 (just released). This fixed the issue for me.
Admin Node 5.6.0 was also just released, which uses the latest Firestore as well.
Upvotes: 1