question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with acknowledge call and owned items

See original GitHub issue

I was experimenting with the TrivialDrive and billing 2.0.0 and found one case that I don’t understand. So I bought an item, then returned it, then Google Play was telling me wrong data so I used another device and same account.

Let’s see the log now:

D/BillingRepository: startDataSourceConnections
D/BillingRepository: connectToPlayBillingService
D/BillingRepository: onBillingSetupFinished successfully
D/BillingRepository: querySkuDetailsAsync for inapp
D/BillingRepository: queryPurchasesAsync called
D/BillingRepository: queryPurchasesAsync INAPP results: 1

At this point I understand that BillingRepo has detected 1 inapp purchase

D/BillingRepository: queryPurchasesAsync SUBS results: 0
D/BillingRepository: processPurchases called
D/BillingRepository: processPurchases newBatch content [Purchase. Json: {"orderId":"GPA......acknowledged":true}]
D/BillingRepository: processPurchases consumables content []
D/BillingRepository: processPurchases non-consumables content [Purchase. Json: {"orderId":"GPA.....,"acknowledged":true}]
D/BillingRepository: processPurchases purchases in the local db 1
D/BillingRepository: handleConsumablePurchasesAsync called with consumables 0 
D/BillingRepository: Calling acknowledgeNonConsumablePurchasesAsync for 1 purchases
D/BillingRepository: acknowledgeNonConsumablePurchasesAsync response is Item is not owned by the user.

I’m not receiving entitled from liveData so the item is locked on the UI.

When I click to launch purchase flow, I get “Error You already own this item.

When I try to consume that item (using its purchase token) so that it becomes available to the user I get this log:

D/BillingRepository: forceConsume called.... 
D/BillingRepository: handleConsumablePurchasesAsync called with consumables 2 
W/BillingClient: Error consuming purchase with token. Response code: 8

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

3reactions
peterhavcommented, Jan 23, 2020

After further investigation, I suspect that the code in the repository is causing problems due to the fact that the playStoreBillingClient.acknowledgePurchase call is being made on all purchases retrieved and not only on the purchases subset that is not yet acknowledged.

I guess that a simple if statement such as: if (!purchase.isAcknowledged){ … } in the acknowledgeNonConsumablePurchasesAsync method could solve this. Note that disburseNonConsumableEntitlement should still be called if the purcase has been acknowledged already.

0reactions
peterhavcommented, Jan 22, 2020

Same problem here. To reproduce:

This is shown in the log:

BillingHelper: Couldn’t find purchase lists, trying to find single data. BillingHelper: Received a bad purchase data. BillingHelper: Couldn’t find single purchase data as well.

When trying to purchase again, the message: “Your order is processing, your item will be available in a few minutes.” is shown.

Any help is appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Top 10 Acknowledgement Statements for Customer ...
1. “I realise that [insert problem] situation is difficult, but let's try and find a solution.” ... This acknowledgement statement recognises the ...
Read more >
How To Acknowledge A Customer's Concern
What to say: ... First, be genuine and say things that sound like you. Let the customer know you heard them, that what...
Read more >
How to Acknowledge Customer Complaints, Build Your Brand ...
Running a company requires handling complaints about defective goods, poor service, and other causes of customer dissatisfaction.
Read more >
Complying with the Telemarketing Sales Rule
These sellers and telemarketers do not have to create or keep any particular records, or purge numbers on the National Do Not Call...
Read more >
Call Blocking Tools and Resources
Phone companies sometimes block calls connected to suspicious calling patterns proactively for their customers. Many phone companies also enable their customers ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found