question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"NOT FOUND" error when using Firebase Function Emulator with React Native ios app

See original GitHub issue

Hi,

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);
        });
...
Screenshot 2020-06-04 at 21 38 09

[REQUIRED] Expected behavior

Log some data into the console.

[REQUIRED] Actual behavior

Getting “NOT FOUND” error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ciocancommented, Feb 15, 2021

Same issue here. React Native has nothing to do with it. When I get the emulator functions address I get “Not found”

Screenshot 2021-02-15 at 21 18 48

Firestore emulator address responds with “ok”

Is this normal?

1reaction
samtsterncommented, Jun 5, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found