thebergamo / react-native-fbsdk-next

MIT License
633 stars 165 forks source link

Expo 50: App Crash with message 'App Add a string value with your app ID for the key FacebookAppID to the Info.plist' #489

Closed islamashraful closed 2 months ago

islamashraful commented 3 months ago

🐛 Bug Report

The library is not working with the Expo SDK 50. The app crashes on pressing the Login button.

With Expo 49, it's working fine.

To Reproduce

Clone the repo Run following commands

yarn 

npx expo run:ios

App crashes and shows the following error

[CoreFoundation] *** Terminating app due to uncaught exception 'InvalidOperationException', reason: 'App ID not
found. Add a string value with your app ID for the key FacebookAppID to the Info.plist or call
Settings.shared.appID.'
*** First throw call stack:
(
0   CoreFoundation                      0x0000000180491128 __exceptionPreprocess + 172
1   libobjc.A.dylib                     0x000000018008412c objc_exception_throw + 56
2   FBSDKCoreKit                        0x0000000104f71098 -[FBSDKInternalUtility validateRequiredClientAccessToken]
+ 0
3   FBSDKCoreKit                        0x0000000104f711ec -[FBSDKInternalUtility validateURLSchemes] + 36
4   FBSDKLoginKit                       0x0000000105284fd8
$s13FBSDKLoginKit12LoginManagerC15logInParameters13configuration12loggingToken20authenticationMethodSDyS2SGSgAA0C13ConfigurationCSg_SSSgSStF
+ 416
5   FBSDKLoginKit                       0x0000000105282d14
$s13FBSDKLoginKit12LoginManagerC19performBrowserLogIn33_C218275A97333B874EDDFE627110566CLL7handleryy<…>

But FacebookAppID is already in the Info.plist

Expected Behavior

Should initiate the login process

Code Example

Here is the repository with minimal code to reproduce the issue.

Environment

System: OS: macOS 14.1 CPU: (14) arm64 Apple M3 Max Memory: 20.57 GB / 96.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.10.0 path: /opt/homebrew/opt/node@20/bin/node Yarn: version: 1.22.21 path: /opt/homebrew/bin/yarn npm: version: 10.2.3 path: /opt/homebrew/opt/node@20/bin/npm Watchman: version: 2023.12.04.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /Users/ashrafulislam/.rbenv/shims/pod SDKs: iOS SDK: Platforms:

mikehardy commented 3 months ago

Looks like you or some other kind Expo user is going to need to fix the config plugin and submit a PR for Expo 50 support

I don't use Expo, so I will not do it myself.

Something around here?

https://github.com/thebergamo/react-native-fbsdk-next/blob/970f240231a99561930f5913022922d3e3441a58/plugin/src/withFacebookIOS.ts#L105-L118

JuanRdBO commented 2 months ago

The FacebookAppID along with the values are actually present in the info.plist file. it must be something else

JuanRdBO commented 2 months ago

With the newest update to expo sdk 50.0.6 this issue is solved!

islamashraful commented 2 months ago

Yes, it has been resolved with the expo version 50.0.6. Thanks everyone!