Javascript react native中的Firebase可调用函数
Firebase可调用函数是否支持与react native一起使用 我部署了一个onCall函数,可以在仪表板中看到它 我还使用Javascript react native中的Firebase可调用函数,javascript,firebase,react-native,google-cloud-functions,Javascript,Firebase,React Native,Google Cloud Functions,Firebase可调用函数是否支持与react native一起使用 我部署了一个onCall函数,可以在仪表板中看到它 我还使用 // Initialize Cloud Functions through Firebase firebase.functions(); 我正在使用 const func = firebase.functions().httpsCallable('funcName'); func({ param1: '', p
// Initialize Cloud Functions through Firebase
firebase.functions();
我正在使用
const func = firebase.functions().httpsCallable('funcName');
func({
param1: '',
param2: '',
param3: '',
param4: ''
}).then(res => {
console.log('success')
console.log(res)
})
但每次我打电话时,承诺都会被拒绝,并显示“未找到”
我的firebase版本是7.6.1
功能代码:
export const funcName = functions.https.onCall((data, context) =>
{
return { message: 'success' }
})
我遇到的问题来自我的firebase配置
{
apiKey: "",
databaseURL: "",
storageBucket: ""
}
一旦我更新了它,它就工作了
{
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: ""
}
请编辑问题以显示客户端和功能代码。如果您能够解决您的问题,请考虑接受您自己的答案: