Search Unity

Error when purchasing Consumable IAP on Windows Store

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

  1. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    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

    Joined:
    May 2, 2017
    Posts:
    14,446
    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. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    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

    Joined:
    May 2, 2017
    Posts:
    14,446
    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. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    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

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

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    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

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

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    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. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    cc @ap-unity

    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? Or there is any other log that I can obtain and it might helps to identify the issue?
     
    Last edited: Apr 25, 2019
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, the device logs would be necessary.
     
  12. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    How can I get that logs? Any doc how to get these needed logs?
    I want to add that I'm also seeing this initialization error for few users: AppNotKnown
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Is it working as expected during your testing?
     
  14. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Yes, I've also tested by purchasing with a real credit card and all is OK for me!
     
  15. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi @/jeffdunity3d,
    Are you able to reproduce this issue on your side? I'm still seeing many users encountering that issue :/
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you able to determine if the affected users are non-US? I did notice FR as Device Language