Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

285
Vistas
Firebase Cloud Function Emulator error with Expo / React Native

I am developing a React Native app using Expo SDK 43 and Firebase 9.6.1, and my app can't call cloud functions running locally in the FB emulator. It can successfully call cloud functions if I deploy them to production, verified by checking the FB logs. Here's the relevant code:

import { initializeApp } from 'firebase/app';
import { connectFunctionsEmulator, getFunctions, httpsCallable } from 'firebase/functions';
import Constants from 'expo-constants';
import firebaseConfig from './firebaseConfig';

const app = initializeApp(firebaseConfig);

const functions = getFunctions(app);

const host = `http://${Constants.manifest.debuggerHost.split(':')[0]}`;
const port = 5001;
connectFunctionsEmulator(functions, host, port);

const helloWorld = httpsCallable(functions, 'helloWorld');
helloWorld();

The console shows:

[Unhandled promise rejection: FirebaseError: internal]
at http://192.168.1.166:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:173824:321 in _createSuperInternal
at node_modules/@firebase/util/dist/index.esm2017.js:538:139 in createMockUserToken
at http://192.168.1.166:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:188248:321 in _createSuperInternal
at node_modules/@firebase/auth/dist/rn/phone-1d904137.js:7922:16 in tslib.__generator$argument_1
at node_modules/@firebase/auth/dist/rn/phone-1d904137.js:7995:0 in <global>
at http://192.168.1.166:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:188924:37 in call$

It's getting the right IP address and port, and, in fact, I can visit the URL in the browser (http://192.168.1.166:5001/MY-PROJECT/us-central1/helloWorld) and see that it's being called in the FB emulator UI. I just can't get the app to do it.

I've been able to use the function emulator before with an older Expo SDK and FB 8, but I'd prefer to stick with what I've got.

Here's the code for the actual cloud function, although I don't think it matters:

import * as functions from 'firebase-functions';

export const helloWorld = functions.https.onCall((data, context) => {
  console.log('something ran');
  console.log(data);
  return data;
});
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda