I integrated Facebook auth into my react-native app two weeks ago. Everything was working fine until today. Today when I tried to login, it thrown an promise rejection error on iOS device but works fine on android.
[Unhandled promise rejection: Error: Tried to perform Facebook login, but no Facebook app id was provided. Specify Facebook app id in Info.plist.]
Exactly… It keeps saying I need to provide App ID even when it’s given, and I’ve tried different versions of expo-facebook with no luck.
I did quite some digging and my best guess is that Facebook-ios SDK had some underlying changes that affected this API call I’ve been struggling to fix this the past two days and it’s so nice to see I’m not the only one experiencing this!
Five minutes ago, I tried from my colleague’s iPhone and to my surprise it worked perfectly. Did you try with another iPhone? I am sure it will work.
Oh wow you are correct, I tried running on my physical phone and it works perfectly… OMG, but why is it not running on simulator? Maybe it’s an iOS version issue.
No, I was not joking, the app was functioning properly earlier probably due to previous active session. I then logged out of the app and tried logging back in, then encountered the same error.
I am also facing this issue on iOS using SDK 33 and I have an educated guess from where this bug might be coming from.
According to Expo SDK 36 release post, the facebook module now has to be initialized with initializeAsync() BEFORE calling logInWithReadPermissionsAsync().
Of course that this should be applicable only to apps using version 36 of expo SDK, but since I am using expo-app on simulator on version 2.13.x and there it works fine, but using expo-app on 2.14.x on real iOS device (which got updated automatically overnight) I am getting the issue, maybe the latest expo-cli (3.11.x) and latest expo-app (2.14.x) both have issues specific to iOS that prevent them from realizing the legacy behaviour on facebook module of previous SDKs, thus producing the error.
Again, just a guess and huge thanks for making expo such a great tool/lib!
Yeap, it also happened overnight for me (due to my physical phone having automatic app updates set to on) and after finding out about the new SDK release and how it changed the Facebook module, I tried the same (bumping to SDK 36) and it worked as well, hence why I did the guessing here for expo team. The thing is that my app isn’t yet ready for that bump to be in production. We have to adjust for all react lifecycle method deprecations and more… So we could really use a fix for expo-app and expo-cli that restores the legacy behaviour of facebook module, if that is possible.