facebook-sdk-for-unity icon indicating copy to clipboard operation
facebook-sdk-for-unity copied to clipboard

The crash occurred on android, most of which occurred on Android 11

Open fightaway opened this issue 3 years ago • 17 comments

Checklist

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 version 11

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?

fightaway avatar Sep 10 '21 11:09 fightaway

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.

rulk avatar Sep 10 '21 14:09 rulk

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

Povstalez avatar Sep 11 '21 02:09 Povstalez

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

fightaway avatar Sep 11 '21 07:09 fightaway

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

actislav avatar Sep 11 '21 22:09 actislav

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?

fightaway avatar Sep 12 '21 08:09 fightaway

image 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

actislav avatar Sep 12 '21 10:09 actislav

my dependencies file like this dependce so, I need to update to 11.3? @actislav

fightaway avatar Sep 12 '21 10:09 fightaway

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 :)

actislav avatar Sep 12 '21 10:09 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 (facebook/[email protected]), and it hurts us :)

Thank you very much ,I will test by "[11.0, 12) -> [11.0, 11.3)"

fightaway avatar Sep 12 '21 11:09 fightaway

consequences of this bug are critical image

actislav avatar Sep 13 '21 11:09 actislav

image 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.

PaulPandaArcade avatar Sep 13 '21 22:09 PaulPandaArcade

image

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.

Whyser avatar Sep 15 '21 07:09 Whyser

same problem, ,I will also test by "[11.0, 12) -> [11.0, 11.3)"

Edit: 11.3 works

xiaozzz avatar Sep 15 '21 09:09 xiaozzz

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

MichaelZhaoCD avatar Sep 15 '21 10:09 MichaelZhaoCD

consequences of this bug are critical image

Which tool is this ?

ghost avatar Sep 16 '21 10:09 ghost

Which tool is this ?

https://appcenter.ms/

actislav avatar Sep 16 '21 11:09 actislav

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.

h3902340 avatar May 26 '22 04:05 h3902340