-
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
[🐛] 🔥 Timestamp/FieldValue issues / plus Firestore crashes in iOS Release Mode Only #8401
Comments
Hmm - strange on this one. I did a release build and release test run for iOS in our e2e app and didn't reproduce any problems in the entire firestore e2e suite - but then again it has been transitioned to the named imports you mention don't crash. If the old way of doing things crashes now, then we must be missing something in our test suite |
i am also facing the same issue any fix for this ? |
I am facing the same issue with
|
I think there are two things going on - one is that there is a crash in react-native 0.77.1 and 0.78.0 (and still in 0.79.0-rc.2) related to null handling. it only happens in iOS in release mode. See discussion on the upstream PR in this specific comment with a patch I'm testing locally that seems to fix it facebook/react-native#49250 (comment) The workaround there is to disable new architecture on iOS (unfortunately, I know, not good...) or to apply the patch from that comment (which appears to work for me) That should resolve this release-mode crash of this issue. The other part of this issue is related to Timestamp and FieldValue I believe and may be a duplicate of typing issues we are tracking elsewhere. But those should crash in dev as well Upstream pick requests:
|
All upstream PRs are picked, and react-native 0.78.1 is released with a fix included - nothing more to do here - upgrading to react-native 0.78.1 is the new recommended solution for the crash I am leaving this open because it was two issues in fact, and the second issue still needs a look:
|
Issue
I have recently upgraded my project from v18.9.0 to 21.12.0 (also affects 21.10.0), and it appears that for iOS release variants only, the following crash is occurring when attempting to utilize the
Timestamp
object from the default export from@react-native-firebase/firestore
. Here is the relevant code:When the
createFirestoreTimestamp
function is called, the following crash is reported:I've noticed that when the code is updated to use the named
Timestamp
class import and make use of its staticnow
method, no crash occurs:Additionally, I've seen that a usage of
FieldArray
in my project is also producing a similar crash:Specifically when
firestore.FieldValue.arrayUnion
is called, the following crash occurs:I've seen that with v22 coming up, the modular API approach as explained here is favored over default exports, however I did not see any requirements that this needed to occur with v21 or any versions prior in the changelog, even though it appears that the modular functionality is being slowly exposed. Has there possibly been a regression introduced with the modular API compatibility changes? Both Android and iOS debug variants work perfectly fine with the existing code we have implemented, and Android release variants also appear not to be affected.
I saw this current issue open that may be relevant as well: #8369
Project Files
Javascript
Click To Expand
package.json
:iOS
Click To Expand
ios/Podfile
:ios/AppDelegate.mm
: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
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:21.12.0, 21.10.0
Firebase
module(s) you're using that has the issue:@react-native-firebase/firestore
TypeScript
?Y
&5.3.3
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: