Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acknowledge not working #507

Open
UlisesSwingU opened this issue Nov 15, 2021 · 4 comments
Open

Acknowledge not working #507

UlisesSwingU opened this issue Nov 15, 2021 · 4 comments

Comments

@UlisesSwingU
Copy link

UlisesSwingU commented Nov 15, 2021

bug

Using com.anjlab.android.iab.v3:library:2.0.0
For all subscriptions the billing processor is returning errorCode = 115

I'm instantiating the billing processor with BillingProcessor.newBillingProcessor(context, key, handler)

and the answer is always

     W/System.err:     at com.mypackage.MyActivity$4.onBillingError(BaseUpgradeActivity.java:258)
     W/System.err:     at com.anjlab.android.iab.v3.BillingProcessor.reportBillingError(BillingProcessor.java:1052)
     W/System.err:     at com.anjlab.android.iab.v3.BillingProcessor.access$1100(BillingProcessor.java:42)
     W/System.err:     at com.anjlab.android.iab.v3.BillingProcessor$18.onAcknowledgePurchaseResponse(BillingProcessor.java:1152)
     W/System.err:     at com.android.billingclient.api.BillingClientImpl.zzo(com.android.billingclient:billing@@4.0.0:12)
     W/System.err:     at com.android.billingclient.api.zzk.call(Unknown Source:6)
     W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
     W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
     W/System.err:     at java.lang.Thread.run(Thread.java:923)

I can se the acknowledge implementation in the library but no related configuration in the documentation.
The subscription is applied and active, with no message for validating again.

@UlisesSwingU
Copy link
Author

UlisesSwingU commented Nov 16, 2021

Also I found this happens only in release versions, debug versions do not throw this error and acknowledge is successful.

Also changing minifyEnabled does not work
is there something we need to change in our proguard-rules?

@serggl
Copy link
Member

serggl commented Nov 17, 2021

Was it error 110 maybe?
I found that onProductPurchased wasn't invoked on the main thread, and thus if you tried to update views in your onProductPurchased - it would crash
Uploaded 2.0.2 to maven central

@UlisesSwingU
Copy link
Author

UlisesSwingU commented Nov 19, 2021

Is 115, I have seen that this happens sometimes when using BillingProcessor.newBillingProcessor(context, key, handler) in different fragments and activities, as if the callback get registered multiple times and for the first the purchase is complete and validated but for the callback where the token of the purchases is used to acknowledge the purchase this returns 115 because the token has been already used to acknowledge the first purchase.
So maybe I'm missing a release() in the destroy of an activity or fragment.

But I would like to know if there is a way to avoid this in the pattern of having a processor in the activity and another in the fragments because we need different callbacks in each one.

I'm already using 2.0.3 I saw there was an open issue addressing the error with the products list in 2.0.2

@bierzorutas
Copy link

bierzorutas commented Dec 3, 2021

Exact same problem here after migrate from 1.1.0, any clue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants