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
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.
at org.json.JSONObject.
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:
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!