-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] 🔥 Database will not load on IOS Release - Works fine on debug mode (IOS Only) #4535
Comments
Okay the problem seems to be limited to |
[EDIT: We discovered that database tests were only running Interesting, all our e2e tests with limitToLast do once's https://github.com/invertase/react-native-firebase/blob/master/packages/database/e2e/query/limitToLast.e2e.js and all the e2e tests with on specifically do activities afterwards https://github.com/invertase/react-native-firebase/blob/master/packages/database/e2e/query/on.e2e.js ...and they only are called once. I wonder if your use cases in testing are just slightly different and nothing is triggering the 'on' somehow? If you can reproduce this, we can fix it but I doubt it will be a difference between debug and release in fact - those differences are rare on iOS - something else to look at is upstream in firebase-ios-sdk to see how they use and test the package: https://github.com/firebase/quickstart-ios/tree/master/database |
Thanks for your help @mikehardy! I am certain limitToLast has little to do with it due to the examples below. I have been testing some code to alert (as I cannot log in release) results on release mode so I can pinpoint the issue, for example: Below does gives me results in debug and release mode:
Same exact code but with
One more thing I noticed is that I am alerting the firebase app instances in both release and debug more with the code below and in release mode I get a
|
I tried initialising a secondary app with JS only and in debug |
We just discovered that the wonderful tests I linked have actually not been executing - we thought they were but there was a glob issue in test discovery prior to execution, so they've been skipped. And wouldn't you know (since you logged this issue!) - it appears there is an issue here. I have not done triage yet, but you are on to something: #4563 |
I ended up moving back to v5 as I needed to make an update for my app but now moved back to 10.0.3 version and the problem still exists 😢 I still cannot load data from realtime database with |
@rezasazesh do you mean v10.3.1 here (current stable) or actually 10.0.3 ? I am pretty sure you mean 10.3.0 (which is fine, it should be working) Here is what we'll need to move forward:
We actually do have testing that is supposed to exercise this stuff, so alternatively you follow the README in the tests directory here, and create a new e2e test for your issue and post it as a PR, when we see it fail we can use it as the success criteria as well. You can use https://github.com/invertase/react-native-firebase/blob/master/tests/README.md |
Thanks @mikehardy I built the skeleton app and my code worked fine there which meant there are things wrong with my project maybe other packages. I am using react-native-splash-screen and seems like commenting out the I know this has nothing to do with RNFB just thought it is quite interesting! Need to look further and see why! |
@rezasazesh One of my strongest recommendations is to stop using the buggy unmaintained react-native-splash-screen immediately and convert to https://github.com/zoontek/react-native-bootsplash which is maintained and does not suffer this problem. Bonus: bootsplash has a little CLI tool packaged with it that makes integrating it a breeze. Reference: My history making react-native-splash-screen work, but then giving up on it: crazycodeboy/react-native-splash-screen#289 (comment) |
@mikehardy Oh wow I had no idea how many problems this was causing! Only problem is that library does not work with React Native Navigation which I have in my project from the sound of it 😢 |
You can't be the only one who is using react-native-navigation with it and I'd be surprised if it's a total failure or just something that happens with the buggy splash screen but no one mentions it, the standard on boot splash is much higher. I encourage you to try it in a test branch as the integration is almost automatic anyway. Then you will have actual test results |
Issue
So I just migrated from V5 to V6 and I am using realtime database and push notification in my project. Everything worked fine in Debug mode for IOS but when I tested over test flight or build a release version on a device the content for the database just does not load. This is only for IOS, everything works perfectly for android and everything works perfectly in debug mode
my usage is very standard, below is an example of the way I used the code for my chat page
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:android/app/build.gradle
:android/settings.gradle
:MainApplication.java
:AndroidManifest.xml
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:"@react-native-firebase/app": "^9.0.0"
Firebase
module(s) you're using that has the issue:"@react-native-firebase/database": "^7.5.15"
TypeScript
?N
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: