我正在用flutter测试firebase_cloud函数 在index.js文件中,我的写法如下所示
export const helloWorld = functions.https.onCall((data, context) => {
return {
message: "Hello World"
};
});
然后我像波纹管一样调用函数
var c = await aa.getHttpsCallable(functionName: 'helloWorld');
var cc = await c.call();
但是当我运行这段代码
Exception has occurred.
PlatformException (PlatformException(functionsError, Cloud function failed with exception., {message: Response is not valid JSON object., details: null, code: INTERNAL}))
这样颤抖
在javasscript中,它返回json,但是为什么会发生错误?