play-billing-samples
play-billing-samples copied to clipboard
Too many bind requests(999+) for service Intent
I'm using BILLING: 6.0.0, I encountered the above error. The devices are mainly Samsung
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.0:64) at sdk.platform.android.inapppurchase.InAppPurchaseUtils.connectToGooglePlayBilling (InAppPurchaseUtils.java:83) at sdk.platform.android.inapppurchase.InAppPurchaseUtils$2.onBillingServiceDisconnected (InAppPurchaseUtils.java:87) at com.android.billingclient.api.zzaf.onServiceDisconnected (com.android.billingclient:billing@@6.0.0:5) at android.app.LoadedApk$ServiceDispatcher.doDeath (LoadedApk.java:2368) at android.app.LoadedApk$ServiceDispatcher$RunConnection.run (LoadedApk.java:2383) 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 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
Help me!
Exactly same issue with some Samsung devices with billing 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)
same here with PBL 5.0.0 this seems to be Samsung Android 13 bug but still hope we can get some insights
100% Samsung on Android 13 (from an app with 10m+ installs)
I had the same issue, only coming from Samsung devices.
Since I want to address this quickly. I have surrounded the billingClient.startConnection(this); with a try catch block. When I get an exception I just end the connection billingClient.endConnection(); billingClient = null; And posting a delayed call to a handler to re-initilize the billingClient.
This approach will at least address the crash.
Same issue using PBL 5.0! Any updates???
Any updates? I don't know why I got many crashes from one app, but others did not. I tried to downgrade the in-app billing SDK version, but it is not working.
Issue seems to be occurring on Samsung devices running Android 13 (mostly while app is in background). Reference:
- https://stackoverflow.com/questions/76512231/do-samsung-phones-running-android-13-have-an-intent-bug
- https://community.revenuecat.com/sdks-51/how-to-fix-crash-too-many-bind-requests-999-for-service-intent-inappbillingservice-3317
- https://forum.developer.samsung.com/t/illegalstateexception-too-many-bind-requests-999-for-service-inte/28242
I am also using billingclient version 6.0.1 and faced the same issue. Is there any updates on this?
I am having the same issue.
Workaround - make sure that billingClient.startConnection()
is called only when app is in foreground