"NOT FOUND" error when using Firebase Function Emulator with React Native ios app
See original GitHub issueHi,
I have a React Native ios app that calls a Firebase function. When I use production environment everything works fine. However when I use the Firebase local emulator I get “NOT FOUND” error. I do use useFunctionsEmulator
with the emulator endpoint http://localhost:5001/
but it doesn’t help.
What is more odd when I try to use the whole function address instead of the emulator endpoint:
useFunctionsEmulator("http://localhost:5001/react-native-showcase-381f9/us-central1/helloWorld");
Everything works fine.
[REQUIRED] Environment info
firebase-tools: 8.4.1
Platform: macOS
React Native: 0.62.2
Running an app inside iPhone emulator
[REQUIRED] Steps to reproduce
exports.helloWorld = functions.https.onCall(() => {
return ['lol', 'internet'];
});
> firebase emulators:start
...
✔ functions[helloWorld]: http function initialized (http://localhost:5001/react-native-showcase-381f9/us-central1/helloWorld).
...
functions().useFunctionsEmulator('http://localhost:5001/');
functions()
.httpsCallable('helloWorld')()
.then(response => {
console.log(response);
});
...

[REQUIRED] Expected behavior
Log some data into the console.
[REQUIRED] Actual behavior
Getting “NOT FOUND” error.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
React Native Firebase problem with emulator on physical device
I am currently trying to set up the Firebase functions emulator to make my dev journey easier. But I can't seem to connect...
Read more >Connect your app to the Cloud Functions Emulator - Firebase
The Firebase Local Emulator Suite emulates products for a single Firebase project. To select the project to use, before you start the emulators,...
Read more >Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, ......
Read more >Cloud Functions | React Native Firebase
This module requires that the @react-native-firebase/app module is already setup and installed. To install the "app" module, view the Getting Started ...
Read more >Firebase functions cannot find module express
React Native Firebase provides native integration with the Android & iOS Firebase SDKs, ... 16. ts(2,79): error TS2307: Cannot find module 'firebase/app'.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same issue here. React Native has nothing to do with it. When I get the emulator functions address I get “Not found”
Firestore emulator address responds with “ok”
Is this normal?
@aleksejkozin there’s really nothing here to suggest that this is an issue with the Functions Emulator or the Firebase CLI. I would suggest filing this issue on the React Native SDK repository.
Also in general this is not enough information to debug. You should at least
catch()
the error and show the output. It may give you some clues as to what is going wrong.