2

Is Firebase callable function supported for use with react native?

I deployed an onCall function and I can see it in my dashboard

I also initalized functions using

 // Initialize Cloud Functions through Firebase
 firebase.functions();

And im calling the function using

    const func = firebase.functions().httpsCallable('funcName');

    func({
        param1: '',
        param2: '',
        param3: '',
        param4: ''
    }).then(res => {
        console.log('success')
        console.log(res)
    })

But every time i make the call the promise is rejected with message 'not-found'

my firebase version is 7.6.1

function code:

  export const funcName = functions.https.onCall((data, context) => 
     {
  return { message: 'success' }
   })
1
  • 1
    Please edit the question to show both the client and function code. Commented Dec 24, 2019 at 2:03

1 Answer 1

2

The problem i was having was coming from my firebase config

 {
  apiKey: "",
  databaseURL: "",
  storageBucket: ""
 }

Once i updated it this it worked

{

    apiKey: "",
    authDomain: "",
    databaseURL: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: ""
}
Sign up to request clarification or add additional context in comments.

1 Comment

If you were able to solve your issue, please consider accepting your own answer :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.