Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Error With Consumable Iap And Windows Store

Discussion in 'Unity IAP' started by Wajdik, Apr 15, 2019.

  1. Wajdik

    Wajdik

    Joined:
    Feb 4, 2015
    Posts:
    196
    Hi,
    Some of my Windows Store (UWP) users are encountering this error when they try to purchase a consumable product: PUR-UserAlreadyOwnsContent

    I'm using Unity IAP v1.20.0 and Unity 2017.4 (.NET scripting backend, .NET 2.0 Subset).
    I'm initializing Unity IAP like this:

    Code (CSharp):
    1.  
    2. foreach (var product in iapItems)
    3. {
    4.     builder.AddProduct(product.id, ProductType.Consumable, new IDs() {
    5.         { product.sku, AppleAppStore.Name},
    6.         { product.sku, GooglePlay.Name},
    7.         { product.sku, WindowsStore.Name},
    8.     });
    9. }
    10.  
    The latest user who reported this issue is running my game on Windows 10 (10.0.17763) 64bit.
    Please to note that not all my users are encountering this issue, only some of them!
    Any idea why they're encountering this issue and how I can fix it?
     
    Last edited: Apr 15, 2019
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,914
    It works correctly in your testing? I'm not clear on the storeID logic, not sure if relevant. Why are you adding multiple storeIDs to the same product?
     
  3. Wajdik

    Wajdik

    Joined:
    Feb 4, 2015
    Posts:
    196
    Hi,
    I didn't tried in testing mode, but there is no issue with many users, only some users contacted me to report this issue (I can't determine the percentage of users getting that issue, but surly it's a shortfall).
    I'm targeting multiple stores (Google Play, App Store, Windows Store...) and the share they same sku.
     
    Last edited: Apr 15, 2019
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,914
    You generally want to test your app prior to release. If you could provide the device logs from an affected user, it would be helpful. For the users that are reporting the issue, have they indeed purchased a consumable previously? And you've tested this scenario yourself in Production with a real credit card?
     
  5. Wajdik

    Wajdik

    Joined:
    Feb 4, 2015
    Posts:
    196
    I'll try to check with the affected users.
    What type of logs do you need to identify the issue? The "PurchaseFailureReason" is sufficient or do you need other details?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,914
    The full device logs, starting with IAP initialization. But first, you'll want to fully test yourself.
     
  7. Wajdik

    Wajdik

    Joined:
    Feb 4, 2015
    Posts:
    196
    I just tested with real credit card and I'm able to purchase twice the same item.
    I'm still awaiting for a response from user who encountered the error (I don't know if even I'll receive a response), but I've attached a screenshot of the issue that I've received from that user.
    IMG_0612_.jpg
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,914
    You'll need to find the specific steps these users are taking during their purchase flow.
     
  9. Wajdik

    Wajdik

    Joined:
    Feb 4, 2015
    Posts:
    196
    I hope I'll get a feedback from them, sent emails but no response from them till now.
    Meanwhile, please to tell your team to be aware about the issue, maybe they can find a way to reproduce it.
     
  10. Wajdik

    Wajdik

    Joined:
    Feb 4, 2015
    Posts:
    196
    Hi,
    Here is the details that I've obtained from one user:
    OS: Windows 10 (10.0.17763) 64bit
    Device Model: Inspiron 5749 (Dell Inc.) DESKTOP-XXXX82
    Device Architecture: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
    Device Resolution: 1600x900
    Device Memory: 8103
    Device Language: FR
    Country: Canada
    Unity version: 2017.4.25f1
    Platform: UWP (.NET Scripting Backend - .NET 2.0 Subset)


    The Unity IAP log:
    Unity IAP version: 1.20.0
    ItemID: coin20
    DateTime: 2019-04-21 00:25:24
    UnityIAPInitializeSucceed: True
    TransactionID: 5b099166-1ae8-4f5d-bc86-82a23f1456d9
    LocalizedPrice: 2,49 $
    AvailableToPurchase: True
    PurchaseFailureReason: Unknown
    LastStoreSpecificPurchaseErrorCode: Unknown


    Is that helpful to identify the issue?