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

[Critical Bug] USER_CANCELLED is no longer triggered when users close the iAP overlay without purchasing #516

Open
max-critcrew opened this issue Feb 2, 2022 · 4 comments

Comments

@max-critcrew
Copy link
Contributor

Hey everyone,

we just updated our game to the latest version ('com.anjlab.android.iab.v3:library:2.0.3') and now the following listener method is no longer being called when the user cancels the purchase overlay:

  @Override
  public void onBillingError(int errorCode, Throwable error) {
    /*
    * Called when some error occurred. See Constants class for more details
    * 
    * Note - this includes handling the case where the user canceled the buy dialog:
    * errorCode = Constants.BILLING_RESPONSE_RESULT_USER_CANCELED
    */
  }

I've tried breakpoints in all kinds of methods to see if the cancellation is triggered anywhere - but it seems like cancelled purchases are no longer triggered at all. This is quite a big problem for us, since we've been showing a loading indicator and removed it again in the cancelled-callback.

This is reproduced live on the Google Play Store (unfortunately, I didn't catch it in testing). But it also happens in debug builds with license testers, etc.

@max-critcrew
Copy link
Contributor Author

max-critcrew commented Feb 2, 2022

It seems like the information is only coming through here now, but you can't access these information without modifying the library (as far as I understand it so far):

public void onPurchasesUpdated(@NonNull BillingResult billingResult,
									@Nullable List<Purchase> purchases)

@serggl
Copy link
Member

serggl commented Feb 2, 2022

@max-critcrew the community here would appreciate if you can provide a patch/PR for this issue

@max-critcrew
Copy link
Contributor Author

@serggl I would love to, but I'm not entirely sure if I really understand the details of the library completely. I just figured out that the cancel event is no longer fired, but you can get it somewhere else. I have no idea if that only happens on certain android version - or if this was tested by the main developers of this library.

It would be amazing if somebody who wrote this part of the code could look at it and then provide an update.

@max-critcrew
Copy link
Contributor Author

@serggl Pull request issued: #517

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

2 participants