Skip to main content
Question

How to fix crash too many bind requests(999+) for service Intent InAppBillingService

  • 13 September 2023
  • 9 replies
  • 1781 views

Forum|alt.badge.img+2

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.

9 replies

Cesar
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 58 replies
  • September 13, 2023

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?


Forum|alt.badge.img+2
  • Author
  • New Member
  • 1 reply
  • September 13, 2023

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

 

 


Forum|alt.badge.img+3
  • New Member
  • 1 reply
  • September 13, 2023

Happens in our application as well, only in Samsung devices


masaibar
Forum|alt.badge.img+4
  • New Member
  • 3 replies
  • September 14, 2023

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


Forum|alt.badge.img+3
  • Active Member
  • 13 replies
  • September 20, 2023

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)


Forum|alt.badge.img+3

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)


Cesar
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 58 replies
  • September 21, 2023

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


masaibar
Forum|alt.badge.img+4
  • New Member
  • 3 replies
  • September 27, 2023

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!


Forum|alt.badge.img
  • New Member
  • 1 reply
  • November 3, 2023
Cesar wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings