Firebase功能中的流删除错误 [英] Stream removed error in Firebase Functions

查看:51
本文介绍了Firebase功能中的流删除错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在创建新用户时运行的功能.该函数通常在一段时间未调用后第一次调用时会失败.我希望有人能帮助我弄清楚是什么原因造成的.

I have a function that runs on the creation of a new user. The function typically fails on the first call after not being called for a while. I'm hoping someone could help me figure out what could be causing this.

export const onUserCreate = functions.auth.user().onCreate(event => {

    const user: User = {
        userId: event.data.uid,
        email: event.data.email
    };

    return db.doc(`users/${user.userId}`).set(data);
});

推荐答案

我遇到了同样的问题.原来这是Firestore节点模块中的错误.将@ google-cloud/firestore更新到0.10.1版本,它应该可以解决该问题.

I had the same issue. Turns out this is a bug in the Firestore Node module. Update @google-cloud/firestore to version 0.10.1 and it should fix the issue.

这篇关于Firebase功能中的流删除错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆