Unable to start activity ProxyBillingActivity, NullPointerException by getIntentSender()
Asked Answered
D

0

18

We are using the latest Google Play billing client com.android.billingclient:billing:4.1.0 as described in https://developer.android.com/google/play/billing/integrate

Sometimes we get this non-reproducible exception in the crash logs, mostly Android 10 devices.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.app/com.android.billingclient.api.ProxyBillingActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.app.PendingIntent.getIntentSender()' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3654)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
    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:2267)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8154)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.app.PendingIntent.getIntentSender()' on a null object reference
    at com.android.billingclient.api.ProxyBillingActivity.onCreate(com.android.billingclient:billing@@4.1.0:12)
    at android.app.Activity.performCreate(Activity.java:7963)
    at android.app.Activity.performCreate(Activity.java:7952)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)
    ... 11 more

Any ideas how to fix/catch?

Donative answered 20/3, 2022 at 7:33 Comment(12)
Billing library 5.0 still has this issue.Donative
I am using revenue cat. Same problem. Did you find a solution?Encrata
Same issue discussed here: github.com/stripe/stripe-android/issues/777Bassist
When is the crash happening for you all? For me its happening while onboarding a new user where there is no billing related code at all. Also, only happening to one user on Pixel 4a.Mime
I get that issue in Firebase Crashlytics and the devices is Nexus 5X. I am not sure, if the app crashes when this issue occurs. Because I could not reproduce by myself.Tatiana
any fix available for thisBarathea
@MarkDelphi same here. Only seems to happen to one user with a Nexus 5X and Android 8.1.0.Rebarbative
same here nexus 5X getting this problem. play billing version 6.1.0Happ
This is strange, I checked the Crashlogs & it turns out its only happening on the same Nexus 5X device with the Android 8.1.0 OSElfredaelfrida
How do you think, app crashes when this issue occurs or it does not and the user also does not notce that there something went wrong?Tatiana
Playbilling 6.2 still has the same problem, which is also the nexus 5x under Android version 8.1Stretcher
Is there any bug report on the google issue tracker entry for this one?Billy

© 2022 - 2024 — McMap. All rights reserved.