Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase 计划函数:HTTP错误:400,请求有错误_Firebase_Google Cloud Functions - Fatal编程技术网

Firebase 计划函数:HTTP错误:400,请求有错误

Firebase 计划函数:HTTP错误:400,请求有错误,firebase,google-cloud-functions,Firebase,Google Cloud Functions,我试着每天午夜运行firebase函数 export const validatePremium = functions.pubsub.schedule('0 0 * * *').onRun(async context => { const snaps = await admin.firestore().collection("Users").where("premium", "==", true).get(); // SOME BUSINESS LOGIC r

我试着每天午夜运行firebase函数

export const validatePremium = functions.pubsub.schedule('0 0 * * *').onRun(async context => {

    const snaps = await admin.firestore().collection("Users").where("premium", "==", true).get();

    // SOME BUSINESS LOGIC
    return true;
})

我得到了错误

⚠  functions: failed to create function validatePremium
HTTP Error: 400, The request has errors

这不是很有帮助

如果我运行与
https.onCall
函数相同的代码,它就会工作


可能是什么问题?

更新firebase tools fixed to issue

更新firebase tools fixed to issue

如果您在部署没有明显错误消息的功能时遇到问题,请直接与firebase支持部门联系。如果您在部署没有明显错误消息的函数时遇到问题,请直接与Firebase支持部门联系。