Open Terurinpic opened 1 year ago
👀 SDKONCALL-194 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Is this happening in sandbox? If so, this is likely happening because the user has many purchases in their receipt, which is common in sandbox. You can try making a new sandbox user. Currently our mobile engineers are working on updating the SDK to handle this sandbox case better, but you likely won't see this happen in production.
If this is in production, please let me know!
@Terurinpic it seems like this ticket is a duplicate of https://github.com/RevenueCat/purchases-flutter/issues/557, would you mind if we close this one out and continue conversation there?
@michaelAtRC it's happening in sandbox. Create a new account and check it out!
@aboedo This issue cannot purchase the same product. (error dialog is not displayed) But #557 shows an error dialog when purchasing different products. So I think it's another issue.
Hey @Terurinpic Happy new year!
Quick question, did creating a new sandbox user and purchasing show you the same problem? Or did it resolve this issue?
Hello @michaelAtRC Happy New Year to you too!
I tried it, but i have the same problem.
Hey @Terurinpic
I have gone ahead and raised this issue to the TRIAGE team. I will keep you updated as I get more information!
The logs show that the request to refresh the receipt was throttled. That seems to be a new thing in StoreKit, since we only started seeing it like a month or two ago. We recently made updates to try to prevent that, but those updates should be a part of 4.5.4, so perhaps that wasn't enough 😬 cc @NachoSoto
@Terurinpic question that might be helpful for us when debugging, are these consumables or non-consumables?
@aboedo consumables!
Thanks for the quick turnaround! We're investigating the issue. It seems likely that it's related to the throttling of the refresh receipt request
@Terurinpic does this reproduce consistently for you? I see a number of purchases for that user in the purchase history for dev.gera.fan.premium_ticket.1
, are you checking the "show sandbox data" checkbox?
@aboedo Reproduce consistently! After launching the app, the first purchase is reflected in the dashboard, but the second purchase is not reflected. I checked "show sandbox data".
@Terurinpic do they show in the SDK in customerInfo under nonSubscriptionTransactions
?
I can't seem to reproduce 😬 I just tried buying the same consumable multiple times in the same session I can see all purchases in the dashboard in sandbox data
@aboedo It seems that the second purchase is not displayed in nonSubscriptionTransactions.(The first purchase is shown.) Oh no... Is there anything that I can do?
Hey @Terurinpic could we get appUserIDs that reproduce this and gather logs for it? I tried looking up the appUserID in the logs but it’s already been cycled out.
@michaelAtRC Should I send the my AppUserId to the URL below? the support section of the Dashboard
Hey @Terurinpic That would be great to create a new support ticket!
@michaelAtRC I sent my AppUserId now!
Hey @michaelAtRC @aboedo The project I'm working on didn't have an app-specific shared secret, so I set it up and now it works! (same https://github.com/RevenueCat/purchases-flutter/issues/557) Thanks for investigating! RC is a great service!
‼️ Required data ‼️
Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!
Environment
flutter doctor
• No issues found!
[Purchases] - WARN: 🍎⚠️ StoreKit 2 purchase took longer than expected (30.57 seconds) [Purchases] - DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple. [Purchases] - DEBUG: ℹ️ SKReceiptRefreshRequest started [Purchases] - WARN: ⚠️ The appUserID passed to logIn is the same as the one already cached. No action will be taken. [Purchases] - DEBUG: ℹ️ Vending CustomerInfo from cache. [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Started [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings [Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings [Purchases] - DEBUG: ℹ️ API request completed: GET /v1/subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings (200) [Purchases] - DEBUG: ℹ️ Skipping products request for these products because they were already cached: ["dev.gera.fan.premium_ticket.1", "dev.gera.fan.premium_ticket.3", "dev.gera.fan.premium_ticket.30.free.20", "dev.gera.fan.premium_ticket.20.free.12", "dev.gera.fan.premium_ticket.10.free.5", "dev.gera.fan.premium_ticket.50.free.50", "dev.gera.fan.premium_ticket.5.free.2", "gera_dev_099_test"] [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Finished [Purchases] - DEBUG: ℹ️ Serial request done: GET subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings, 0 requests left in the queue [Purchases] - DEBUG: ℹ️ SKReceiptRefreshRequest finished [Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/D7D69861-EF24-45E9-B889-D4311FA5F728/StoreKit/sandboxReceipt [Purchases] - DEBUG: ℹ️ Skipping products request for these products because they were already cached: ["dev.gera.fan.premium_ticket.1"] [Purchases] - DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: DXtY6V9dOmTieLJwo1fPBXC0EHD2 [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Started [Purchases] - INFO: ℹ️ Receipt parsed successfully [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Posting receipt (note: the contents might not be up-to-date, but it will be refreshed with Apple's servers): { "opaque_value" : "siIZ1WcLpkVQACSIVatZlw==", "original_application_version" : "1.0", "bundle_id" : "fan.gera.dev", "sha1_hash" : "LnbWuFETws5mGv3ThsmyjegSsfA=", "application_version" : "827", "creation_date" : "2022-12-22T03:56:49Z", "in_app_purchases" : [ { "product_id" : "dev.gera.fan.premium_ticket.1", "quantity" : 1, "transaction_id" : "2000000234083525", "is_in_trial_period" : false, "web_order_line_item_id" : 0, "original_purchase_date" : "2022-12-22T03:56:43Z", "original_transaction_id" : "2000000234083525", "product_type" : 1, "purchase_date" : "2022-12-22T03:56:43Z" } ] } [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST receipts [Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts [Purchases] - DEBUG: ℹ️ API request completed: POST /v1/receipts (200) [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Finished [Purchases] - DEBUG: ℹ️ Serial request done: POST receipts, 0 requests left in the queue [Purchases] - DEBUG: ℹ️ Sending updated CustomerInfo to delegate. [Purchases] - INFO: 💰 Finishing transaction '2000000234083525' for product 'dev.gera.fan.premium_ticket.1' [Purchases] - INFO: 😻💰 Purchased product - 'dev.gera.fan.premium_ticket.1'
[Purchases] - WARN: ⚠️ The appUserID passed to logIn is the same as the one already cached. No action will be taken. [Purchases] - DEBUG: ℹ️ Vending CustomerInfo from cache. [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Started [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings [Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings [Purchases] - DEBUG: ℹ️ API request completed: GET /v1/subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings (200) [Purchases] - DEBUG: ℹ️ Skipping products request for these products because they were already cached: ["dev.gera.fan.premium_ticket.10.free.5", "dev.gera.fan.premium_ticket.30.free.20", "dev.gera.fan.premium_ticket.20.free.12", "gera_dev_099_test", "dev.gera.fan.premium_ticket.50.free.50", "dev.gera.fan.premium_ticket.5.free.2", "dev.gera.fan.premium_ticket.1", "dev.gera.fan.premium_ticket.3"] [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Finished [Purchases] - DEBUG: ℹ️ Serial request done: GET subscribers/DXtY6V9dOmTieLJwo1fPBXC0EHD2/offerings, 0 requests left in the queue <SKReceiptRefreshRequest: 0x280852340>: Finished refreshing receipt with error: Error Domain=ASDErrorDomain Code=603 "Request throttled" UserInfo={NSLocalizedDescription=Request throttled, NSLocalizedFailureReason=Unified receipt is valid and current} [Purchases] - DEBUG: ℹ️ SKReceiptRefreshRequest finished [Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/D7D69861-EF24-45E9-B889-D4311FA5F728/StoreKit/sandboxReceipt [Purchases] - DEBUG: ℹ️ Skipping products request for these products because they were already cached: ["dev.gera.fan.premium_ticket.1"] [Purchases] - DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: DXtY6V9dOmTieLJwo1fPBXC0EHD2 [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Started [Purchases] - INFO: ℹ️ Receipt parsed successfully [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Posting receipt (note: the contents might not be up-to-date, but it will be refreshed with Apple's servers): { "opaque_value" : "siIZ1WcLpkVQACSIVatZlw==", "original_application_version" : "1.0", "bundle_id" : "fan.gera.dev", "sha1_hash" : "LnbWuFETws5mGv3ThsmyjegSsfA=", "application_version" : "827", "creation_date" : "2022-12-22T03:56:49Z", "in_app_purchases" : [ { "product_id" : "dev.gera.fan.premium_ticket.1", "quantity" : 1, "transaction_id" : "2000000234083525", "is_in_trial_period" : false, "web_order_line_item_id" : 0, "original_purchase_date" : "2022-12-22T03:56:43Z", "original_transaction_id" : "2000000234083525", "product_type" : 1, "purchase_date" : "2022-12-22T03:56:43Z" } ] } [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST receipts [Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts [Purchases] - DEBUG: ℹ️ API request completed: POST /v1/receipts (200) [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Finished [Purchases] - DEBUG: ℹ️ Serial request done: POST receipts, 0 requests left in the queue [Purchases] - INFO: 💰 Finishing transaction '2000000234084002' for product 'dev.gera.fan.premium_ticket.1' [Purchases] - INFO: 😻💰 Purchased product - 'dev.gera.fan.premium_ticket.1'