Search Unity

Large Number of unique PurchasingUnavailable instances in Logs

Discussion in 'Unity IAP' started by GBRicky, Apr 8, 2020.

  1. GBRicky

    GBRicky

    Joined:
    Apr 8, 2020
    Posts:
    2
    We have recently switched to Unity IAP and we have noticed a large number of instances of ‘PurchasingUnavailable’ in our logs for unique users. We are able to force this error ourselves by switching off purchasing in iOS settings but without doing so our test devices all seem to all be running Unity IAP well on both Android and iOS. It seems to us unlikely that so many users have switched off purchasing but we cannot see any obvious culprit for causing IAP initialization to fail. The unity documentation for this error is rather limited (https://docs.unity3d.com/2017.3/Doc...ationFailureReason.PurchasingUnavailable.html) so we suspect there may be other reasons why this error is occurring.


    1. Is this a common experience?

    2. What are the known causes of PurchasingUnavailable?

    3. How can we debug this to make sure the maximum number of users can use IAP?
     
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    This is usually a problem caused by the IAP settings or network of a few users and is not common. You can remind users to check IAP / network settings after IAP initialization fails. In addition, please ensure that Unity IAP will not be initialized again after successful initialization, you can use if(UnityPurchasing.IsInitialized) to determine whether the IAP has been successfully initialized before initializing the IAP.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Does it work in your testing? Where are the problem users located, perhaps in Asia or China? And what do you mean bye "switching off IAP", this isn't something the users can do. Can you provide the specific steps you believe they are following?
     
  4. GBRicky

    GBRicky

    Joined:
    Apr 8, 2020
    Posts:
    2
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, but likely not the reason for your errors. Do you have the device model of the affected users? Country by chance? Huawei devices may show this error, for example.
     
  6. joaocarrion

    joaocarrion

    Joined:
    Oct 14, 2015
    Posts:
    6
    @GBRicky I was looking into "PurchaseUnavailable" and found that some people cannot buy IAP because they have Management Profiles from their work places on their iPhones blocking IAP.
     
    nicholasr and JeffDUnity3D like this.