android-inapp-billing-v3 icon indicating copy to clipboard operation
android-inapp-billing-v3 copied to clipboard

OnBillingError error 110 after successful Subscription

Open AbanoubWagdyWahib opened this issue 7 years ago • 9 comments
trafficstars

I am now still on alpha version of in-app products but i am trying to subscribe to item but i am getting error 110 although Subscription is done successfully

Any advises

AbanoubWagdyWahib avatar Dec 21 '17 16:12 AbanoubWagdyWahib

I have the same issue, here's the log

onBillingError - i=110 throwable=java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference"

andrew-sirenko avatar Jan 14 '18 13:01 andrew-sirenko

@andrew-sirenko do you have a complete stacktrace? What you've presented is virtually useless.

autonomousapps avatar May 20 '18 20:05 autonomousapps

@autonomousapps

2019-01-22 13:44:33.973 1058-1058/? E/iabv3: Error in handleActivityResult java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:116) at org.json.JSONTokener.nextValue(JSONTokener.java:94) at org.json.JSONObject.(JSONObject.java:159) at org.json.JSONObject.(JSONObject.java:176) at com.anjlab.android.iab.v3.BillingProcessor.handleActivityResult(BillingProcessor.java:932) at me.theoptimal.ui.signup.SignUpActivity.onActivityResult(SignUpActivity.kt:351) at android.app.Activity.dispatchActivityResult(Activity.java:7462) at android.app.ActivityThread.deliverResults(ActivityThread.java:4391) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4440) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

E/[main] MyActivity: IAP | some error occurred. See Constants class for more details: 110, java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference

--------- beginning of system

I have totally the same implementation on the test project, everything is the same and there is no problem with that.

khyzhun avatar Jan 22 '19 13:01 khyzhun

@autonomousapps

The problem is in the method handleActivityResult link to the file: click line number 961

khyzhun avatar Jan 22 '19 13:01 khyzhun

Hi @SashaKhyzhun , I'm afraid I no longer have time to assist with this project.

autonomousapps avatar Jan 22 '19 15:01 autonomousapps

Same error occurs, Do we have any detailed documentation

SaadBilal avatar Jan 23 '19 11:01 SaadBilal

@autonomousapps @SaadBilal Okay, I figured out. After the researching I get it.

The problem was in the google play cache. IDK what is goin' on their side, but the factory reset fixed my problem. I know, it was too desperate a step, but anyway it helped.

====================================

My situation:

I had a couple of accounts on my phone. And also, I had a couple of cards there. plus a mess with google account: someone is the owner, someone is a tester, etc.

====================================

The main goal to fix this issue is clearing your google account's cache. How to:

  1. Go to: Settings –> Application Manager –> Google Play Store –> Force Stop.
  2. Settings –> Application Manager –> Google Play Store –> Clear Data.
  3. Settings –> Application Manager –> Google Play Store –> Clear Cache.
  4. Look for Google Service Framework (Google Play Services).
  5. Now Clear Data and Clear Cache.
  6. Now you can use PlayStore without getting any kind of error.
  7. Now Reboot your device and open Google play store.

If it doesn't work for you - google how to do it and search another way.

khyzhun avatar Jan 23 '19 11:01 khyzhun

Call billingProcessor.loadOwnedPurchasesFromGoogle(); before handleActivityResult gets called. For example: in onCreate or onResume.

petekeller2 avatar May 07 '19 14:05 petekeller2

This error also happens if you try to "purchase" when you should be "subscribe"-ing!

SethArchambault avatar Oct 27 '20 04:10 SethArchambault