Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

205
Visualizações
(ERROR: internal) Testing Firebase functions using React Native Expo

I'm trying to test my firebase functions in my React Native Expo app. Here's my initialization code:

import { connectFunctionsEmulator, getFunctions } from 'firebase/functions'

// ...Initialize app 

export const fucntions = getFunctions()
connectFunctionsEmulator(fucntions, "localhost", 5001)

I then have code which maps functions in an object:

import { httpsCallable } from "firebase/functions";
import { fucntions } from "../../firebase";

export default {
    helloFirebase: httpsCallable(fucntions, "helloFirebase")
}

And I call the function as follows:

functionsObj.helloFirebase({ myParam: "Hello!" })
    .then((res) => {
        console.log(res)
    })
    .catch((error) => {
        console.log(error.message)
    })

But when I call the function I get the following, very small and unspecific error message in the console:

ERROR: internal

I'm guessing it's something to do with not being able to access localhost, but I still don't know how to fix the issue.

Any help would be appreciated, thanks!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

FIXED: I found this article on this exact issue.

Make sure to run firebase serve --only functions -o ${YOUR_LOCAL_IP} once you've followed all the steps

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda