-
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
[🐛] Firestore ultra slow writes after upgrade on Android (App 8.2.0 -> 8.4.1 & Firestore 7.4.3 -> 7.7.0) #4189
Comments
Before that (down to 8.2.0 the firebase-bom was 25.3.1 My advice: Upgrade back to current stable versions of react-native-firebase, you want those bug fixes. Override your firebase-bom https://rnfirebase.io/#android to 25.3.1 and re-test. My hypothesis is you will not reproduce your performance problem - this should be a "negative test", and if your performance is fine, it means react-native-firebase is fine but there is a problem somewhere between version 25.3.1 and 25.7.0 of the firebase-android-sdk bill of materials versions. Then you will want to "bisect" between those firebase-android-sdk versions to see where the problem starts, and check their release notes and active issues to see what's going on upstream. If my hypothesis is wrong, if you update react-native-firebase back to current stable versions, but override the firebase-android-sdk down to 25.3.1 and you still reproduce the problem, then the problem is here and we will bisect the changes here while pinning the bill of materials to 25.3.1. Please let us know what you find |
Hello, thanks for the quick reply. Indeed you were right, we have found that the issue comes from firebase-bom. More specifically, I believe the bug started with Firebase BoM 25.6.0 (which includes firestore 21.5.0), an issue on the android-sdk #1906 seems to be describing a very similar problem which should be fixed with future updates. |
Well I'm glad you've got at least a temporary solution @ericedouard and thanks for a bunch for following up and linking the related issue, that will help others that aren't sure where the problem is if they are hit with this |
Hello, I also tried the above solution like using the latest versions for all firebase libs and overriding the BOM version to 25.3.1, but it's not helping. Could any one please guide me on this? Thanks in advance! |
@pmakwanaPresentation please open a new issue following the template carefully, the original issue here is solved (or at least has a workaround). For your case also make sure that you have done |
We have the same issue, can you tell us to downgrad only firebase-bom @eric-edouard |
Looks like firebase/firebase-android-sdk#1906 is fixed, could we get a patch on RNF ? |
Hi @ScreamZ, is Firestore slow for you in Android ? |
It is, I didn't gave a try to the hacky patch solution above yet |
Same for us, and the hacky solution doesn't work for us |
@ScreamZ we are not in control of the firebase-android-sdk release schedule and in fact have no influence on it. You will have to wait until the next release. Here is the definitive information on release status for that patch: firebase/firebase-android-sdk#1971 (comment)
It appears an older BOM may be used to try resolving your issue by moving to a version of firestore prior to 21.5.0, https://firebase.google.com/support/release-notes/android#bom_v25-4-1 Override the BOM to get the version like so: https://rnfirebase.io/#android / https://github.com/mikehardy/rnfbdemo/blob/9e80bacc9b62961f89246eea82dd956f4f8660f8/make-demo.sh#L39 This of course may have other side effects as you are going downwards in versions but it may help you. |
The Latest Firebase BoM 25.11.0 (release 30.09) works properly with the latest RNF packages. Can you check this version in your project? |
Looks like that Firestore release 21.6.0 has solved this issue .. This release is included in Firebase BoM 25.10.0 I think that RNfirebase team should update their libraries to fix this important issue As a side fix .. try to override BoM version in your |
@MujtabaFR we typically don't do version releases just to bump the underlying SDK versions, we normally only bump those when we rely on underlying APIs that were added thus requiring the bump. The override is there for this exact reason and will be the way to access higher performance firestore writes for those that need it probably for a while as I don't think there are any other PRs requiring new APIs from that BoM version |
You're correct @mikehardy, users can override the SDK Versions according to their needs. But normally every user of RNfirebase follows your updates without overriding.. so every app will have this sever issue (the app will become useless if connection to firestore failed) sorry for the long comment, But in my opinion, this is a sever issue that needs a release to bump the underlying SDK version |
@MujtabaFR I look forward to your PR implementing the same, it should pass tests here, we can merge it |
Worth mentioning that many of my users still have connection failure to firestore despite of overriding Firebase BoM to 25.12.0 Update 1:looks like the overriding feature is not working for me.. I'm getting the same old BoM version Update 2:the overriding code needs to be in the |
I don't believe connection failure will be resolved by anything other than a more stable network? I still need to work through whatever is causing the android build failure in our CI E2E tests, but I will note I'm using the 25.12.0 BoM successfully in my work project |
Upgrade firebase sdk version to 25.12.0 to fix [issue invertase#4189](invertase#4189)
Upgrade firebase sdk version to 25.12.0 to fix [issue invertase#4189](invertase#4189)
* Upgrade firebase sdk version Upgrade firebase sdk version to 25.12.0 to fix [issue #4189](#4189) * Update iid android library Co-authored-by: Mike Hardy <[email protected]> * update sdk for ios firebase, iid and playServicesAuth * update firebase bom version * Update FirebaseSDKVersion * Install firebase-tools as dev dep in tests, reference locally * De-integrate pre-compiled firestore, incompatible with Xcode12+detox invertase/firestore-ios-sdk-frameworks#15 * Exclude arm64/i386 from simulator build archs for Xcode12 compatibility Without these, there are linker failures as Xcode12 attempts to build for all archs, even when it's not really possible * Workaround upstream MLKit dependency-related compile failures https://firebase.google.com/support/release-notes/android#mlkit-self-serve-fixes firebase/firebase-android-sdk#1904 * Use Xcode "latest-stable" (12 now) in E2E CI This should fix #4397 Co-authored-by: Mujtaba F. Radhi <[email protected]>
…rtase#4401) * Upgrade firebase sdk version Upgrade firebase sdk version to 25.12.0 to fix [issue invertase#4189](invertase#4189) * Update iid android library Co-authored-by: Mike Hardy <[email protected]> * update sdk for ios firebase, iid and playServicesAuth * update firebase bom version * Update FirebaseSDKVersion * Install firebase-tools as dev dep in tests, reference locally * De-integrate pre-compiled firestore, incompatible with Xcode12+detox invertase/firestore-ios-sdk-frameworks#15 * Exclude arm64/i386 from simulator build archs for Xcode12 compatibility Without these, there are linker failures as Xcode12 attempts to build for all archs, even when it's not really possible * Workaround upstream MLKit dependency-related compile failures https://firebase.google.com/support/release-notes/android#mlkit-self-serve-fixes firebase/firebase-android-sdk#1904 * Use Xcode "latest-stable" (12 now) in E2E CI This should fix invertase#4397 Co-authored-by: Mujtaba F. Radhi <[email protected]>
Any updates? |
There should be no expectation for any updates on closed issues, especially year old ones. If you can reproduce on current stable versions please open a new issue, thank you |
Issue
Hi, we have encountered a bug on the latest version of Firestore which makes write operations (specifically updates) very slow (up to 40 seconds). This seems to happen only on Android, with the Firestore's
set()
andupdate()
functions.After many hours of debugging, it turns out that downgrading back to our previous version all our RNFirebase packages by setting fixed versions (removing the ^) solved the issue.
We do not know on which version specifically the bug started.
Do not hesitate if you need any more information
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
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
react-native info
output:react-native-firebase
version you're using that has this issue:^8.2.0
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: