Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Unity IAP not initialized

Discussion in 'Unity IAP' started by Ziggy90, Nov 23, 2020.

  1. Ziggy90

    Ziggy90

    Joined:
    Mar 15, 2017
    Posts:
    6
    Hello, we are having trouble initializing Unity IAP. It seems to fail at "getSkuDetails() failed: 2:Unknown" and the IStoreListener.OnInitiliazed(...) is not getting called . I've checked that SKU is correct, app is in Internal testing in Google Play Console, package name, version, build number... I have my google acc listed in testers.
    Does someone know what "(response: 2:Unknown)" means ?

    The issue appears on Android, works on iOS
    Unity 2019.4.5f1
    Unity IAP 2.0.6

    Here is logcat:
    11-23 16:43:10.817: I/UnityIAP(25208): IAB helper created.
    11-23 16:43:11.678: I/UnityIAP(25208): Starting in-app billing setup.
    11-23 16:43:11.681: I/UnityIAP(25208): Billing service connected.
    11-23 16:43:11.681: I/UnityIAP(25208): invoking callback
    11-23 16:43:11.682: I/UnityIAP(25208): Checking for in-app billing 3 support.
    11-23 16:43:11.684: I/UnityIAP(25208): In-app billing version 3 supported for com.xxx
    11-23 16:43:11.686: I/UnityIAP(25208): Subscriptions AVAILABLE.
    11-23 16:43:11.688: I/UnityIAP(25208): Subscription upgrade and downgrade are AVAILABLE.
    11-23 16:43:11.690: I/UnityIAP(25208): Subscriptions information parse AVAILABLE.
    11-23 16:43:11.703: I/UnityIAP(25208): VR supported.
    11-23 16:43:11.704: I/UnityIAP(25208): onIabSetupFinished: 0
    11-23 16:43:11.704: I/UnityIAP(25208): Requesting 3 products
    11-23 16:43:11.704: I/UnityIAP(25208): QueryInventory: 3
    11-23 16:43:11.704: I/UnityIAP(25208): invoking callback
    11-23 16:43:11.704: I/UnityIAP(25208): Querying owned items, item type: inapp
    11-23 16:43:11.704: I/UnityIAP(25208): Package name: com.xxx
    11-23 16:43:11.704: I/UnityIAP(25208): Calling getPurchases with continuation token: null
    11-23 16:43:11.706: I/UnityIAP(25208): Owned items response: 0
    11-23 16:43:11.707: I/UnityIAP(25208): Continuation token: null
    11-23 16:43:11.707: I/UnityIAP(25208): Querying SKU details.
    11-23 16:43:11.893: I/UnityIAP(25208): getSkuDetails() failed: 2:Unknown
    11-23 16:43:11.894: I/UnityIAP(25208): onQueryInventoryFinished: false
    11-23 16:43:11.894: I/UnityIAP(25208): Error refreshing inventory (querying prices of items). (response: 2:Unknown)
    11-23 16:43:11.894: I/UnityIAP(25208): Failed to Query inventory. UnityIAP will automatically retry in 5000ms
     
  2. John_Corbett

    John_Corbett

    Unity Technologies

    Joined:
    May 17, 2019
    Posts:
    151
    Hello!

    Can you try updating your IAP from Asset Store to 2.2.2 with In-App Purchasing in Package manager v 2.2.1?
     
  3. Ziggy90

    Ziggy90

    Joined:
    Mar 15, 2017
    Posts:
    6
    Yes, that helped, thank you !