Android-inapp-billing-v3: OnBillingError error 110 after successful Subscription

Created on 21 Dec 2017  Â·  9Comments  Â·  Source: anjlab/android-inapp-billing-v3

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

question

All 9 comments

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 do you have a _complete_ stacktrace? What you've presented is virtually useless.

@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.

@autonomousapps

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

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

Same error occurs, Do we have any detailed documentation

@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.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joaoarmando picture joaoarmando  Â·  5Comments

ncanella picture ncanella  Â·  4Comments

najam-amfnrh9 picture najam-amfnrh9  Â·  6Comments

KRIPT4 picture KRIPT4  Â·  3Comments

mochat97 picture mochat97  Â·  6Comments