-
Hi, I have an expo app in Bare workflow, and react-native-firebase (app, auth, db) works fine on web, but on iOS I get a runtime error that prevents the app from running:
I've tried the various solutions across the web for that error, with no luck, and also followed all the instructions for iOS at https://rnfirebase.io/ , tried lots of cleaning and rebuilding (including
Please help? 🥺🐶🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Hi there!
That's vague, I'm not sure what you tried or did not try and what the results of each experiment were, whether you reverted after the experiment etc. Science (and troubleshooting is a science...) needs to be methodical, share methodology and results etc. In the past I have never had a single person provide me a reproduction of this, as you've likely read if you read through the related issues: https://github.com/invertase/react-native-firebase/issues?q=NativeEventEmitter+requires+a+non-null+argument Lots of "me too", no "here's a reproduction", so it is hard to help. For the absolute avoidance of doubt, a correctly integrated react-native-firebase installation does not have this problem, and I provide an automated reproduction that proves it: https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh - so there is a high bar here to prove a claim that "react-native-firebase does not load at all", as I show it loading. What's the difference between that build proof and your project? Expo. I don't use Expo so I can't help much there but the common thread on those other issues is "I'm using Expo managed..." and that perhaps a prebuild will fix it. All I can say with certainty is: this repository does not currently have any reproduction that shows this problem, it only has reproductions that show it does not have it. |
Beta Was this translation helpful? Give feedback.
-
Hi Mike, thanks for the quick reply, yeah I assumed it's likely not a bug with any of the libs or SDKs so I'm not surprised that a bare minimum react-native-firebase app works, just a setup/configuration issue that I was hoping someone in the community may have deep exerience enough to know how to track it down or what else to check. Yeah |
Beta Was this translation helpful? Give feedback.
-
@mikehardy do you have any helpful insight as to what tends to cause this in general and how to troubleshoot it? E.g. my best guess as a somewhat-beginner on the platform is library incompatibility, since it sounds like there is code calling
|
Beta Was this translation helpful? Give feedback.
-
I rechecked everything carefully against the iOS instructions at rnfirebase.io, and also checked the XCode project against Firebase's own iOS instructions. Trying to figure out why there is no RNFBAppModule; is there a way to turn on debug level logging, like maybe at the Objective-C level in AppDelegate.mm before [FIRApp configure] is called? Chat-GPT 4o suggested
|
Beta Was this translation helpful? Give feedback.
-
In my case, the only blunder was that I still had some packages installed from when had started out using the JS package instead of @react-native-firebase packages. My original packages.json above has packages Thanks for the support, @mikehardy. |
Beta Was this translation helpful? Give feedback.
In my case, the only blunder was that I still had some packages installed from when had started out using the JS package instead of @react-native-firebase packages. My original packages.json above has packages
firebase
andexpo-firebase-analytics
, and after removing them, then deintegrating and installing the pods, cleaning and building the app, my bare expo app no longer gets the NativeEventEmitter() error. I don't know exactly why that causes the RNFBApp module to be unavailable, but apparently there is interference between those packages.Thanks for the support, @mikehardy.