Skip to main content

Hello,

In our Firebase Crashlytics reports, we have noticed a recurring exception being faced by our users related to in-app billing.

This issue has 37,775 crash events affecting 1,549 users

Here are the error details:

Fatal Exception: java.lang.IllegalStateException: Too many bind requests(999+) for service Intent { act=com.android.vending.billing.InAppBillingService.BIND pkg=com.android.vending cmp=com.android.vending/com.google.android.finsky.billing.iab.InAppBillingService (has extras) }
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2115)
at android.app.ContextImpl.bindService(ContextImpl.java:2024)
at android.content.ContextWrapper.bindService(ContextWrapper.java:870)
at com.android.billingclient.api.BillingClientImpl.launchBillingFlow(com.android.billingclient:billing@@5.1.0:52)
at com.revenuecat.purchases.google.BillingWrapper.startConnection(BillingWrapper.kt:122)
at com.revenuecat.purchases.google.BillingWrapper.startConnectionOnMainThread$lambda-3(BillingWrapper.kt:108)
at com.revenuecat.purchases.google.BillingWrapper.$r8$lambda$hLiSTu2HCHKyRrb-HVFlJFdt_lQ(BillingWrapper.kt)
at com.revenuecat.purchases.google.BillingWrapper$$ExternalSyntheticLambda9.run(D8$$SyntheticClass:2)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

We would appreciate any insights into the potential cause of this issue and guidance on how it can be resolved.

Thank you for your assistance.

Hi @sami-21f14f 

Thanks for reporting. We’ve been looking at this IllegalStateException but couldn’t see the whole stacktrace, so this is perfect.

According to our reports, all crashes come from Samsung devices, is it the same for your reports?


Yes, upon reviewing our Crashlytics reports, it seems that all the crashes related to this IllegalStateException are indeed coming from Samsung devices.

 

 


Happens in our application as well, only in Samsung devices


The exact same crash is occurring in my app as well.
All Samsung devices, 100% background.


Here’s info from our project, in case it helps:

100% Samsung

100% Android 13

77% Background

 

 

The project is currently using Purchases v6.7.0, which is not the latest, but we will get this updated in the next release.

 

I checked the git log and crash reports, it seems that the crash started surfacing when we updated from Purchases v6.5.0 to v6.7.0 (diff)


Any update on this? Besides the crash we observe that performance is massively impacted.

Experiencing on Samsung S20 FE, Android 13. Using Purchases 6.0.0. Here’s the Stack trace:

 

Fatal Exception: java.lang.IllegalStateException: Too many bind requests(999+) for service Intent { act=com.android.vending.billing.InAppBillingService.BIND pkg=com.android.vending cmp=com.android.vending/com.google.android.finsky.billing.iab.InAppBillingService (has extras) }

       at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2115)

       at android.app.ContextImpl.bindService(ContextImpl.java:2024)

       at android.content.ContextWrapper.bindService(ContextWrapper.java:870)

       at com.android.billingclient.api.BillingClientImpl.startConnection(com.android.billingclient:billing@@5.1.0:52)

       at com.revenuecat.purchases.google.BillingWrapper.startConnection(BillingWrapper.kt:115)

       at com.revenuecat.purchases.google.BillingWrapper.startConnectionOnMainThread$lambda-3(BillingWrapper.kt:101)

       at com.revenuecat.purchases.google.BillingWrapper.$r8$lambda$hLiSTu2HCHKyRrb-HVFlJFdt_lQ()

       at com.revenuecat.purchases.google.BillingWrapper$$ExternalSyntheticLambda5.run(:2)

       at android.os.Handler.handleCallback(Handler.java:942)

       at android.os.Handler.dispatchMessage(Handler.java:99)

       at android.os.Looper.loopOnce(Looper.java:226)

       at android.os.Looper.loop(Looper.java:313)

       at android.app.ActivityThread.main(ActivityThread.java:8762)

       at java.lang.reflect.Method.invoke(Method.java)

       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)

       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)


We have just released 6.9.5 that includes a fix that prevents the exception from crashing the app. This stackoverflow issue has a good explanation of why this could be happening, if interested https://stackoverflow.com/questions/76512231/do-samsung-phones-running-android-13-have-an-intent-bug . It honestly looks like a Samsung issue with intents.

We are going to monitor our crash reporting systems but can you please confirm the exception is gone when updating? Thanks


Thank you for updating the library!
After installing 6.9.5 into the app and watching it for a while, the crash seems to have gone silent!


We have just released 6.9.5 that includes a fix that prevents the exception from crashing the app. This stackoverflow issue has a good explanation of why this could be happening, if interested https://stackoverflow.com/questions/76512231/do-samsung-phones-running-android-13-have-an-intent-bug . It honestly looks like a Samsung issue with intents.

We are going to monitor our crash reporting systems but can you please confirm the exception is gone when updating? Thanks

Hi, 

  I update to 7.0.1, but still received those crashes.

  All crashes come from Android 13 Samsung phones, no other android version, either phones

  Here is the Stack trace:

  My Google Billing SDK version is 6.0.1 

Fatal Exception: java.lang.IllegalStateException: Too many bind requests(999+) for service Intent { act=com.android.vending.billing.InAppBillingService.BIND pkg=com.android.vending cmp=com.android.vending/com.google.android.finsky.billing.iab.InAppBillingService (has extras) }
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2115)
at android.app.ContextImpl.bindService(ContextImpl.java:2024)
at android.content.ContextWrapper.bindService(ContextWrapper.java:870)
at com.android.billingclient.api.BillingClientImpl.startConnection(com.android.billingclient:billing@@6.0.1:64)
at remote.market.google.iap.BillingClientLifecycle.startBillingConnectRequest(BillingClientLifecycle.kt:182)
at remote.market.google.iap.BillingClientLifecycle.retryBillingServiceConnectionWithExponentialBackoff$lambda-1(BillingClientLifecycle.kt:192)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

 


Reply