Facebook SDK crashes randomly, it doesn't give any info regarding what this crash is about; we don't even know the action when this is happening and we are not able to reproduce this.
Gradle setting
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
We are using facebook sbk to send events to FB analytics
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.json.JSONObject.optBoolean(java.lang.String, boolean)' on a null object reference
at com.facebook.UserSettingsManager$1.run(UserSettingsManager.java:148)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
According to this reply from Marc Hayek of the Facebook team, we may upgrade the version to fix the issue.
implementation 'com.facebook.android:facebook-login:4.41.0'
Hope this helps you.
After some investigation i realized that the bug has been introduced in sdk 4.40
so i have changed gradle to
implementation 'com.facebook.android:facebook-login:4.39.0'
and that should remove the bug until a fixed newer FB sdk will be released
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With