facebook-sdk-for-unity
facebook-sdk-for-unity copied to clipboard
The crash occurred on android, most of which occurred on Android 11
Checklist
- [x] I've updated to the latest released version of the SDK
- [x] I've searched for existing GitHub issues
- [x] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [x] I've read the Code of Conduct
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
Environment
Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:
- Unity Editor Version:
2019.4.30f1
- Unity SDK Version:
11.0.0
- Installation Platform & Verison:
Android
version11
In order to solve a crash problem on android caused by Unity, I upgraded my Unity from 2019.4.29f1 to 2019.4.30f1. Unfortunately this time I found a new crash problem. The details information for this problem is as follows:
-
Caused by java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter args
at com.facebook.appevents.iap.InAppPurchaseBillingClientWrapper$BillingClientStateListenerWrapper.invoke(:12) at java.lang.reflect.Proxy.invoke(Proxy.java:1006) at $Proxy2.onBillingServiceDisconnected() at com.android.billingclient.api.zzah.onServiceDisconnected(com.android.billingclient:billing@@3.0.3:4) at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1811) at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1826) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:205) at android.app.ActivityThread.main(ActivityThread.java:6991) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:884)
According to the information provided on the Firebase Crashlytics dashboard, all crashes occur in the background, and most of them occur on Android 11. After analyzing the information, it seems that the crash occurred on the callback of the onBillingServiceDisconnected event (com.facebook.appevents.iap.InAppPurchaseBillingClientWrapper$BillingClientStateListenerWrapper.invoke). Since I don’t have an Android 11 device, there is no way to reproduce this crash, and I don’t know how to reproduce it. Now onServiceDisconnected event, do you have any suggestions?
Enviroment:
- Unity version 2021.1.5f
- Unity SDK Version 11.0.0
- Install Platform: Android 11 and Android 10
Hi, we are experiencing the same issue with
com.facebook.appevents.iap.InAppPurchaseBillingClientWrapper$BillingClientStateListenerWrapper.invoke (Unknown Source:12) java.lang.reflect.Proxy.invoke (Proxy.java:1006) $Proxy2.onBillingServiceDisconnected com.android.billingclient.api.zzah.onServiceDisconnected (com.android.billingclient:billing@@3.0.3:4) android.app.LoadedApk$ServiceDispatcher.doDeath (LoadedApk.java:2103) android.app.LoadedApk$ServiceDispatcher$RunConnection.run (LoadedApk.java:2118) android.os.Handler.handleCallback (Handler.java:938) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:246) android.app.ActivityThread.main (ActivityThread.java:8512) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1139)
For us it usually occures right after first launch resulting in application suspenshion/ crush. This is a crytical issue for us as it prevents us from releasing an update.
Reproduction is hard, we were able to reproduce on factory reset device right after first application launch. But timing is unstable, so it probably connected with network somehow.
This issue started to occure right after adding support for multidex, maybe it is connected somehow.
Enviroment:
- Unity version 2020.3.12f
- Unity SDK Version 11.0.0
- Install Platform: Android 11 and Android 10
Hi, we are experiencing the same issue with
com.facebook.appevents.iap.InAppPurchaseBillingClientWrapper$BillingClientStateListenerWrapper.invoke (Unknown Source:12) java.lang.reflect.Proxy.invoke (Proxy.java:1006) $Proxy3.onBillingServiceDisconnected com.android.billingclient.api.zzah.onServiceDisconnected (com.android.billingclient:billing@@3.0.3:4) android.app.LoadedApk$ServiceDispatcher.doDeath (LoadedApk.java:1981) android.app.LoadedApk$ServiceDispatcher$RunConnection.run (LoadedApk.java:1996) android.os.Handler.handleCallback (Handler.java:938) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:236) android.app.ActivityThread.main (ActivityThread.java:7889) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:600) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:967)
We are update FB plugin from 8.1.0 to 11.0.0 and now have thiss issue
Enviroment:
- Unity version 2021.1.5f
- Unity SDK Version 11.0.0
- Install Platform: Android 11 and Android 10
Hi, we are experiencing the same issue with
com.facebook.appevents.iap.InAppPurchaseBillingClientWrapper$BillingClientStateListenerWrapper.invoke (Unknown Source:12) java.lang.reflect.Proxy.invoke (Proxy.java:1006) $Proxy2.onBillingServiceDisconnected com.android.billingclient.api.zzah.onServiceDisconnected (com.android.billingclient:billing@@3.0.3:4) android.app.LoadedApk$ServiceDispatcher.doDeath (LoadedApk.java:2103) android.app.LoadedApk$ServiceDispatcher$RunConnection.run (LoadedApk.java:2118) android.os.Handler.handleCallback (Handler.java:938) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:246) android.app.ActivityThread.main (ActivityThread.java:8512) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1139)
For us it usually occures right after first launch resulting in application suspenshion/ crush. This is a crytical issue for us as it prevents us from releasing an update.
Reproduction is hard, we were able to reproduce on factory reset device right after first application launch. But timing is unstable, so it probably connected with network somehow.
This issue started to occure right after adding support for multidex, maybe it is connected somehow.
Since the crash is caused by appevents, is it possible to circumvent this crash by turning off the automatic logging of events through FB.Mobile.SetAutoLogAppEventsEnabled? If you can reproduce this crash, can you test it? thank you very much
lucky that I have 2 almost identical versions of the application in prod, and the only difference that I found related to the SDK in build log is using com.facebook.android.facebook-applinks-11.2.0.aar com.facebook.android.facebook-common-11.2.0.aar com.facebook.android.facebook-core-11.2.0.aar com.facebook.android.facebook-gamingservices-11.2.0.aar com.facebook.android.facebook-login-11.2.0.aar com.facebook.android.facebook-share-11.2.0.aar
in version without this bug, and *.11.3.0 in version with this bug
lucky that I have 2 almost identical versions of the application in prod, and the only difference that I found related to the SDK in build log is using
com.facebook.android.facebook-applinks-11.2.0.aar com.facebook.android.facebook-common-11.2.0.aar com.facebook.android.facebook-core-11.2.0.aar com.facebook.android.facebook-gamingservices-11.2.0.aar com.facebook.android.facebook-login-11.2.0.aar com.facebook.android.facebook-share-11.2.0.aar
in version without this bug, and *.11.3.0 in version with this bug
Sorry, I didn't find what you said in that file? Can you tell me in detail how to fix this error?
Do something like this, it will exclude android libs (11.3 https://github.com/facebook/facebook-android-sdk/releases/tag/sdk-version-11.3.0) with this issue from dependencies
my dependencies file like this
so, I need to update to 11.3? @actislav
yes, as temporary solution it will work, but in future we need to wait fixes in https://github.com/facebook/facebook-android-sdk/, as we see, they are moving to Kotlin from Java (https://github.com/facebook/facebook-android-sdk/compare/sdk-version-11.2.0...sdk-version-11.3.0), and it hurts us :)
yes, as temporary solution it will work, but in future we need to wait fixes in https://github.com/facebook/facebook-android-sdk/, as we see, they are moving to Kotlin from Java (facebook/[email protected]), and it hurts us :)
Thank you very much ,I will test by "[11.0, 12) -> [11.0, 11.3)"
consequences of this bug are critical
Do something like this, it will exclude android libs (11.3 https://github.com/facebook/facebook-android-sdk/releases/tag/sdk-version-11.3.0) with this issue from dependencies
We've just discovered this issue and it's resulting in around 30% of our users crashing on Android. Did the above dependency changes resolve the crash?
We have several Android devices to test on be haven't been able to reproduce the crash so we can't conform the above changes fix the issue.
This is an unacceptable crash issue and version 11.3 should be removed as a valid release immediately! We have 5k crashes (probably more) because of this.
same problem, ,I will also test by "[11.0, 12) -> [11.0, 11.3)"
Edit: 11.3 works
from decompile, u guys can check some differences bwteen 11.3.0 and 11.2.0
11.3.0 (got crash)
11.2.0
so "[11.0, 12) -> [11.0, 11.3)" will be good
consequences of this bug are critical
Which tool is this ?
Which tool is this ?
https://appcenter.ms/
same problem, ,I will also test by "[11.0, 12) -> [11.0, 11.3)"
Edit: 11.3 works
We are still receiving the same crashes after changing to the dependency from [11.0, 12) to [11.0, 11.3). We see that the SDK version showing on the Facebook Developer Console is still 11.3.