profile
viewpoint

Ask questions[Android] react-native-fbsdk 1.1.2 / 2.0.0 , RN 0.61.5 NullPointerException at com.facebook.marketing.CodelessActivityLifecycleTracker$1.onActivityPaused

Having a lot of crashes with production users (RN 0.61.5, react-native-fbsdk). Integration seems to work fine and no crashes on iOS, only Android. Wasn't able to replicate it locally but Google Play Console shows tons of it.

PS: integration was made following github README instructions, no manual changes to gradle or MainApplication.java, just yarn add react-native-fbsdk , AndroidManifest.xml, strings.xml as suggested. Any ideas?

Huawei P20 Pro (HWCLT), Android 9
Report 1 of 1
java.lang.RuntimeException: 
  at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:4742)
  at android.app.ActivityThread.performPauseActivity (ActivityThread.java:4691)
  at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:4626)
  at android.app.servertransaction.PauseActivityItem.execute (PauseActivityItem.java:45)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:145)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:70)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2199)
  at android.os.Handler.dispatchMessage (Handler.java:112)
  at android.os.Looper.loop (Looper.java:216)
  at android.app.ActivityThread.main (ActivityThread.java:7625)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:987)

Caused by: java.lang.NullPointerException: 
  at com.facebook.marketing.CodelessActivityLifecycleTracker$1.onActivityPaused (CodelessActivityLifecycleTracker.java:129)
  at android.app.Application.dispatchActivityPaused (Application.java:260)
  at android.app.Activity.onPause (Activity.java:1839)
  at androidx.fragment.app.FragmentActivity.onPause (FragmentActivity.java:470)
  at com.facebook.react.ReactActivity.onPause (ReactActivity.java:57)
  at android.app.Activity.performPause (Activity.java:7663)
  at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1536)
  at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:4726)

Originally posted by @cihati in https://github.com/facebook/react-native/issues/24498#issuecomment-524234973

facebook/react-native-fbsdk

Answer questions janicduplessis

Can you try 2.0.0, it updates facebook sdk to v7.0.

useful!

Related questions

'React/RCTConvert.h' file not found hot 2
Build Failed with Semantic Issue Property 'expiredPermissions' not found on object of type 'FBSDKAccessToken *' hot 2
'FBSDKCoreKit / FBSDKCoreKit.h' file not found hot 2
'React/RCTComponentEvent.h' file not found hot 2
Property 'previewPhoto' not found on object of type 'FBSDKShareVideoContent *' hot 1
'React/RCTComponentEvent.h' file not found hot 1
Unable to share photo by MessageDialog hot 1
'React/RCTComponentEvent.h' file not found hot 1
'React/RCTComponentEvent.h' file not found RCTFBSDKLoginButtonManager.m hot 1
LoginManager.logInWithReadPermissions is not a function hot 1
Facebook comments plugin? hot 1
FBSDKPackage in class FBSDKPackage cannot be applied to given types; CallbackManager not found hot 1
TypeError: Cannot read property 'logEvent' of undefined hot 1
Failed to build on latest version of react native hot 1
null is not an object (evaluating LoginManager.logInWithReadPermissions) hot 1
source:https://uonfu.com/
Github User Rank List