Closed kostaa closed 5 years ago
Are you trying to use Flutter cloud_functions
plugin to invoke regular https.onRequest()
function, because that's what it looks like from this error.
You can only invoke https.onCall()
functions with the Flutter plugin. The benefit of onCall
functions is that they abstract all authentication details, so that once you've authenticated with Firebase on your Flutter app you can simply send requests to onCall
functions without needing to handle authentication yourself (the context
argument of onCall
function holds information about authenticated user).
If you created regular https.onRequest
function you can simply invoke it using regular HTTP client.
Hope this helps.
Got it. Many thanks.
I have finally wired it all up using the Cloud Functions Plugin on my Flutter client to call the function but now getting a
CloudFunctionsException/Response is missing data field
on the client after the call returns.I have tried this with a simple 'Hello world' function as well (which returns a correct response in the browser) and getting the same issue. Just wondering if I need to construct the response differently for the client plugin be able to consume it.
Regards, Adam