Functions GetHttpsCallable not working on iOS or Android
robertmaxted opened this issue · comments
Hi Guys,
I am trying to migrate my functions over from using http client etc, to using the CrossFireBaseFunctions. However I am getting these errors:
On iOS:
{Foundation.NSErrorException: Error Domain=com.firebase.functions Code=5 "NOT FOUND" UserInfo={NSLocalizedDescription=NOT FOUND}
at Plugin.Firebase.Functions.Platforms.iOS.HttpsCallableWrapper.d__41[[System.Collections.Generic.List
1[[Vanity.Models.Business, Vanity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()\n at...
On Android:
{Firebase.Functions.FirebaseFunctionsException: NOT_FOUND
at Plugin.Firebase.Functions.Platforms.Android.HttpsCallableWrapper.d__41[[System.Collections.Generic.List
1[[Vanity.Models.Business, Vanity, Version=1.0.0.0, Culture=neutral, PublicKeyTok…}
The Call:
`var jsonData = JsonConvert.SerializeObject(data); // Convert data dictionary to JSON string
var functions = CrossFirebaseFunctions.Current;
var businesses = await functions.GetHttpsCallable("someFunction").CallAsync<List>(jsonData);`
It throws the error on the call.
I have checked that the function exists in firebase functions.
Firestore, auth etc all work as expected, it is just cloud functions. I have also checked that there aren't any restrictions on the API keys, they are all ok.. I am stumped. Any advice or time would be greatly appreciated.
Kind regards,
Rob
I'm going to guess your functions are outside us-central1
. The plugin doesn't support this OOTB but it would be a small PR.
Ahh!! I see, thanks @AdamEssenmacher ! Yes They are in europe-west2.. Is there anything I can do to help with this?
If you're comfortable submitting a PR, that's probably going to be the quickest way it gets done. CrossFirebaseFunctions.CreateInstance
just needs an overload to accept the region and the two platform implementations updated to implement.
Thanks @AdamEssenmacher I have made the changes: #293
Should be set for the next release
@AdamEssenmacher Thanks for approving etc. That's great news! When is the next release??
@AdamEssenmacher Also, thanks for the clean-up and changes.
@TobiasBuchholz has the release keys... so whenever he gets around to it.
@AdamEssenmacher Thanks for the info. @TobiasBuchholz Any idea roughly when you will be releasing next? Many thanks.
Hi @robertmaxted,
I've just released the new package versions Plugin.Firebase.Functions 2.0.3 and Plugin.Firebase 2.0.14 that contain your PR 🚀 Thanks for your contribution! :)
Hi @robertmaxted,
I've just released the new package versions Plugin.Firebase.Functions 2.0.3 and Plugin.Firebase 2.0.14 that contain your PR 🚀 Thanks for your contribution! :)
@TobiasBuchholz Awesome! You Hero! Thanks for getting that done so fast Tobias 👍
Sure, no problem! I would say it was a nice team effort! :D
Sure, no problem! I would say it was a nice team effort! :D
Yeah for sure! Thanks again also @AdamEssenmacher