EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Functions httpsCallable does not work on iOS #1643

Open hughesyp opened 3 years ago

hughesyp commented 3 years ago

When calling my https callable cloud function from inside the app on an iOS device the app doesn't crash but the function call returns an error. This works fine on android devices. Authentication and database works fine on iOS it is just the function call that doesn't work. I have upgrade tns version and I am using the latest version of the firebase plugin.

Code

const data = {
  lat: result.latitude,
  lon: result.longitude
}
const weatherSunMoon = firebase.functions.httpsCallable("weatherSunMoon");
weatherSunMoon(data)
.then((response: any) => {                                     
//process response
}).catch((errorMessage: string) => {
   console.log("WeatherSunMoon Function Error: " + errorMessage);
});

Error

CONSOLE LOG file: app/components/Home.vue?367e:205:48: 'WeatherSunMoon Function Error: Error: FIRFunctions app projectID cannot be nil.'

hughesyp commented 3 years ago

Can anyone help me with this?

hughesyp commented 3 years ago

Anyone???

djokone commented 3 years ago

Hi @hughesyp, I've got the same problem on IOS, do you have any updates about it ? @EddyVerbruggen do you have some ideas how to fix this issue ?

The link between Callable Functions and the firebase project settings seem to be broken ... but I don't really know where looking for, to fix it. If someone has advices ? Thx again for all the work done ! ;)