i am testing firebase_cloud function with flutter and in index.js file i wrote like below
export const helloWorld = functions.https.onCall((data, context) => {
return {
message: "Hello World"
};
});
and i call the function like bellow
var c = await aa.getHttpsCallable(functionName: 'helloWorld');
var cc = await c.call();
but when i run this code
Exception has occurred.
PlatformException (PlatformException(functionsError, Cloud function failed with exception., {message: Response is not valid JSON object., details: null, code: INTERNAL}))
flutter say like this
in javasscript it return json but why error occur?