capacitor-community / facebook-login

Facebook Login support
MIT License
98 stars 52 forks source link

App crashes when using FacebookLogin.login() on IOS simulator #116

Open Coachmake opened 1 year ago

Coachmake commented 1 year ago

When I click on a button that calls the facebook.login() method, the app crashes immediately.

Steps to reproduce the behavior:

  1. Follow the guides steps to add code to ios/App/App/AppDelegate.swift file and to info.plist file
  2. import plugin to component file and declare login() function which contains FacebookLogin.login() method and asigns the response to a variable to be used later on in the function.
  3. Create button which calls the login() function upon click
  4. Clicking the button crashes the app abruptly

I tested the web configuration and that is working as it should. So I know that the facebook popup should come up and allow the user to login using their facebook account.

ciccilleju commented 1 year ago

which version are you using? have you included the cliend id too?

wwsh commented 1 year ago

same for me:

2023-06-19 18:19:14.131585+0200 App[44547:3391439] *** 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                      0x00007ff8004288ab __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff80004dba3 objc_exception_throw + 48
    2   FBSDKCoreKit                        0x00000001061aa4aa -[FBSDKInternalUtility validateRequiredClientAccessToken] + 0
    3   FBSDKCoreKit                        0x00000001061aa63d -[FBSDKInternalUtility validateURLSchemes] + 37
    4   FBSDKLoginKit                       0x00000001063d4ee2 $s13FBSDKLoginKit12LoginManagerC15logInParameters13configuration12loggingToken20authenticationMethodSDyS2SGSgAA0C13ConfigurationCSg_SSSgSStF + 562
    5   FBSDKLoginKit                 

Followed advice from the Internet but it don't work out. Seems like the FB SDK cannot read Info.plist for some reason. Any help?

youssef-hany commented 1 month ago

its hapening for me also