Expo-facebook crash

Please provide the following:

  1. SDK Version: 45
  2. Platforms(Android/iOS/web/all): all
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I am looking in the Play Console and seeing a lot of errors like this from crashes:


Is this a known issues and is there a fix for it in a future version?

Here is the stack trace:

Exception : java.lang.IllegalArgumentException	app.everydate
  at android.app.ActivityThread.deliverResults (ActivityThread.java:5633)
  at android.app.ActivityThread.handleSendResult (ActivityThread.java:5672)
  at android.app.servertransaction.ActivityResultItem.execute (ActivityResultItem.java:54)
  at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2423)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:233)
  at android.os.Looper.loop (Looper.java:334)
  at android.app.ActivityThread.main (ActivityThread.java:8348)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:582)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1065)
Caused by java.lang.IllegalArgumentException:
  at android.app.PendingIntent.checkFlags (PendingIntent.java:375)
  at android.app.PendingIntent.getBroadcastAsUser (PendingIntent.java:645)
  at android.app.PendingIntent.getBroadcast (PendingIntent.java:632)
  at com.facebook.AccessTokenManager.setTokenExpirationBroadcastAlarm (AccessTokenManager.java:164)
  at com.facebook.AccessTokenManager.setCurrentAccessToken (AccessTokenManager.java:130)
  at com.facebook.AccessTokenManager.setCurrentAccessToken (AccessTokenManager.java:110)
  at com.facebook.AccessToken.setCurrentAccessToken (AccessToken.java:245)
  at com.facebook.login.LoginManager.finishLogin (LoginManager.java:719)
  at com.facebook.login.LoginManager.onActivityResult (LoginManager.java:242)
  at com.facebook.login.LoginManager$1.onActivityResult (LoginManager.java:181)
  at com.facebook.internal.CallbackManagerImpl.onActivityResult (CallbackManagerImpl.java:81)
  at expo.modules.facebook.FacebookModule.onActivityResult (FacebookModule.kt:62)
  at versioned.host.exp.exponent.modules.universal.ScopedUIManagerModuleWrapper.onActivityResult (ScopedUIManagerModuleWrapper.kt:33)
  at host.exp.expoview.Exponent.onActivityResult (Exponent.kt:99)
  at host.exp.exponent.experience.ReactNativeActivity.onActivityResult (ReactNativeActivity.kt:335)
  at android.app.Activity.dispatchActivityResult (Activity.java:8712)
  at android.app.ActivityThread.deliverResults (ActivityThread.java:5626)

Hi @apps.genie,

The expo-facebook package has been deprecated and is removed from SDK 46. We recommend using react-native-fbsdk-next. Please follow instructions on how to install it in your Expo project from here to add it as a config plugin. After adding the config plugin, you’ll have to rebuild your app since the library adds custom native code.

You can follow its documentation for further use of the library.

We also recommend using Development Builds since running external custom native code is not possible in Expo Go. Please see the Deprecation message in the expo-facebook library reference page for more information.

thank you for your reply. So what is happening is that I currently have SDK 45 with expo-facebook still in production and migrating to SDK 46 in a beta and already using react-native-fbsdk-next. It seems that expo-facebook is using react-native-fbsdk-next under the hood and they both have a known issue that has been fixed in the latest version. So maybe that is why I have this error in the Play Console for beta and production… Now I am trying to upgrade to the latest react-native-fbsdk-next but that is causing the EAS builds to fail :frowning: so still working through it…

Btw, is react-native-fbsdk-next really the only package available to use with facebook and Expo?

If you haven’t got it resolved, can you share the error log where the EAS Build is failing?

You can take a look at https://reactnative.directory/?search=facebook to see if there are other packages that fulfill your need or not.

yea looked at that a while back and for logging in with facebook it does seem like it’s just this one :frowning: the others are deprecated or not actively maintained, but most importantly need those that support EAS…

as for the EAS issue it seems to have solved after clearing all node_modules and installing locally and then retriggering the EAS build… not too sure why this would even matter… It was failing at some gradle step

Maybe there was a dependency version incompatibility and the lock files (either package.json or yarn.lock) might not have the correct dependency version.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.