-
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 crash on user authentication on iOS only #7695
Comments
@jakechao-zeal , However, I'm not able to fully test authentication from scratch since on a freshly installed app the test user was already authenticated, meaning that even if I delete the app it looks like iOS hangs on to some data. Given the code appears to be the same, I would suspect that an authentication API had a breaking change that this library is not prepared for. I can't repro on simulator either. Started happening via a Testflight app. @mikehardy , any ideas? I think it's an upstream issue but maybe something we can handle in this repo. |
This issue also looks slightly different, but mentions problems with higher versions of GRPC. Maybe we need to downgrade to the same version (1.44). |
I'll try and see if downgrading GRPC or maybe the firebase SDK (although as mentioned in #7666 it seems like versions lower than 10.22.0 for the IOS Firebase SDK are having build errors) helps. I'll keep you updated if I find anything and would greatly appreciate it if you update me on any findings you have. Thanks, and I hope we can get this sorted out soon! |
@rgomezp FYI that I posted a comment on my issue #7697 about updating to Expo SDK 50 (which required other dependency updates) and how that led to the crash going away. I'm personally not sure if my app is ready to go to Expo SDK 50 so I'd love to see if a solution can be found for our existing package dependencies but wanted to let you know that was one solution available to us. It seems some dependency update between Expo 49 and 50 helped alleviate the issue with RNFB. |
@jakechao-zeal , FYI I opened an issue here as well: firebase/firebase-ios-sdk#12606 |
I am facing exact same issue on Expo50, crash at startup for all iOS users (all iOS versions and phone models) while firebase auth initialization I guess.
|
I fixed it by forcing update to firebase 10.23.0
created a patch file: then updated pod files in ios folder: and rebuilt in root folder: |
Enorme! I see reference to a gRPC fix in the latest release notes from Google. However, it still doesn't explain what broke and why it started crashing all of a sudden. Again, makes me think it's an upstream issue. I'm not a fan of patching packages though. |
Update: looks like there's a PR open for it: #7699 Edit: I opened a PR with the native package firebase/firebase-ios-sdk#12606 |
I'll have that PR merged and released probably in the next hour or so @rgomezp, if that helps - your workaround is valid though (patching app/package.json to include the higher SDK version) - there is nothing more to it on our side other than docs and qualifying the release in our e2e testing prior to release |
I need to update the build today. I solved this issue by downgrading packages. // package.json (19.0.1 -> 18.8.0) // ios/Podfile, Add this line. |
Thanks so much for your work on this @mikehardy Hmm. I haven't tried this myself, but @jeonghoonkim if that's what works for you then we still need an upstream fix from @mikehardy. Some folks like myself are using a managed Expo project. I would also like to understand what exactly happened. Everything was working fine and then just broke. BUT HOW?? |
Not sure what's going wrong at the native layer - looks like it will be a firebase-ios-sdk fix in the end. But react-native-firebase 19.1.0 is out with latest native at least (firebase-ios-sdk 10.23.0) |
Tested this myself and can confirm 19.1.0 was not a fix, unfortunately. @jeonghoonkim , why did you have to revert to 18.8.0? Also, does anyone know a fix for managed Expo builds? |
I read XCode stack traces... |
Thanks for the reply. Shouldn't that be enough then? Why do we have to also add the GRPC version to the Podfile? I unfortunately don't have lots of control over the Podfile since I use EAS cloud build under a managed workflow (Expo). I can work around this for now, but I don't want to change my deploy process ideally |
@rgomezp Yeah I totally agree with you and I really don't want to edit Podfile like this, too. Hope for a fix by the package maintainers 😅 |
I found an alternative fix. This might not apply to everyone here but my environment is:
I upgraded @react-native-google-signin/google-signin to 11.0.0 and the problem went away. However, I had refused to do that prior because of this warning in those release notes. Raising the target to 13.4 in that podspec doesn't lead to any issues afaict on 49, although I suppose it may not work as expected on some old devices? Anyway, for anyone experiencing this issue and is using google-signin with Expo 49, give that a shot. |
@rgomezp interesting - if google-signin required an upgrade, but react-native-firebase upgraded or not upgraded did not matter, then I wonder if the general issue is inconsistent (or perhaps not-updated / contains an issue) gRPC that's being pinned by google-signin's old version - implying that really getting everything on current versions is the trick @jeonghoonkim - are you also using other packages that might pull in gRPC and have outdated versions? |
Copying this from an issue closed as duplicate to make sure all informative comments are here in one spot, this is from @jillhc on #7697 (comment) Seeing exactly the same crash in our project, that uses RN Firebase + Expo. A couple notes to add:
@jakechao-zeal have you reported to Expo too? I can share these notes there as well. |
Thanks @mikehardy ! I'll also add, the login call is the first Firebase call used in our app, so I'm not positive if the issue is specific to auth or would crash on any interaction with the Firebase backend. |
I'm seeing the exact same behavior as reported in the other issue. Once you log in, it will always continue crashing on startup. The only way to fix is to delete the app and re-install. Depends on how your login is setup though. In terms of upgrading Google Sign In, the only changes between those versions is the Can others seeing the issue also share your environment? |
@mikehardy here is our list: |
@fasola81 Try 0.0.24 |
Thanks @jeonghoonkim , We are using Expo and building with EAS, which gives us limited control over native dependencies. I don't believe there's an easy way for us to update those directly within this setup. Does anyone have any information or methods to do this? |
this is work for me.
|
I'm in the same boat. I'm using managed builds with EAS. I believe the only way we can do this is by ejecting to a bare workflow (remove android and ios directories from gitignore). Although I think this might be a good opportunity to create a config plugin that does this. I'll see what I can put together. |
Alright, I've got a solution for managed Expo builds. https://github.com/rgomezp/expo-pod-pinner
Done! |
looks spot on, giving it a try. Thanks @rgomezp ! |
I might be silly, but I'm getting No target named StickerSmash :( |
hi @rgomezp, thank you again, Im not clear what a targetName should be, is it an app name or something else? Per your post: Specify the target in your Podfile where the pods should be added. |
@fasola81 if you open your Podfile, you should see Normally this is the same as your app |
@vethan, you should use your own target name! 🤣 |
I AM SILLY! 🤣 Figured it out after installing the WLS and doing a prebuild! Advice to others: Put the expo-pod-pinner as your last plugin, as at the mo it seems later changes to podfiles might get lost for some reason |
@rgomezp confirming that your solution worked for us. Thank you all for your help with this. |
Cheers @rgomezp ! Works for me although I had problems until I downgraded back to @react-native-firebase version 18.7.3. |
done, thanks again @rgomezp, really appreciate your help. |
I am also using expo's managed workflow and was able to solve this problem using expo-build-properties, so I'll share it with you just in case.
|
Hi everyone, I encountered the same issue but was fortunate enough to find a solution after following a lengthy discussion. Special thanks to @rgomezp @mikehardy for their input!
However, due to Apple's requirement that all apps must upgrade to iOS SDK 17, I had to migrate my project from Expo 49 to Expo 50 after resolving the initial crash issue. Unfortunately, this migration led to a exactly the same crash again. Has anyone else experienced this problem? Note that I used the following versions for both Expo 49 and Expo 50: @react-native-firebase/app: "19.0.1" Any insights or experiences related to this issue would be greatly appreciated! Thank you! |
Just to reply to myself and maybe it is useful for others. I found that if I upgrade to Expo 50 and use
I have to remove expo-pod-pinner plugins array in app.json to successfully execute EAS build and No crash in the Testflight. I think that Expo 50 has fixed the issue. Everything works fine. |
Thanks so much for the update! So if I understand this correctly, it only affects expo and specifically their build services but not local builds (strange but I think that's correct?), and now it appears if using expo 50 and most current version here with no version pins it works? Would be great to hear this was confirmed by any other affected people... |
I co-incidentally upgraded to expo 50 this week, so tried removing the pod-pinner + upgraded to react-native-firebase 19.1.1 and the crash is gone. This could be related to react native 0.72.x?? Because the crash was happening with people on react native not using expo! Maybe update the requirements to react native 0.73.xx? (For anyone still on 0.72.xx, pinning BoringSSL-GRPC to 0.0.24 and using version 18 of react-native-firebase works as a workaround) |
Let me share what I had tested (managed Expo project). Hope this is helpful.
|
@geoffcfchen |
With apologies - going to close this as not actionable here but what a strange issue |
Issue
App crashes after Google authentication using Google Sign In. Then, always immediately on open.
Crash logs mention SSL issue with Firestore.
This is happening on a Testflight installed app. I can't reproduce it in a simulator.
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:e.g. 18.8.0
Firebase
module(s) you're using that has the issue:TypeScript
?Y
:5.1.3
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: