【发布时间】:2020-10-27 18:32:57
【问题描述】:
我正在使用 Firebase 功能在 Firebase 托管下开发一个项目。 索引.js:
exports.simpleFunction = functions.https.onCall((data, context) => {
return data;
});
索引.html:
var simpleFunction = firebase.functions().httpsCallable('simpleFunction');
simpleFunction("12").then (function(result) {
console.log(result);
}).catch(function(error) {
console.log("Error code:" + error.code);
});
在控制台中我只得到:
“错误代码:内部”
谁能帮我弄清楚发生了什么?
【问题讨论】:
-
您使用的是哪个版本的 Firebase 客户端 SDK?函数控制台上的错误日志说明了什么?
-
天啊!!!!版本 vas 7.21.1,我不得不更改为 8.0.0。非常感谢!!!
标签: javascript node.js firebase google-cloud-functions