Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

not initializing on some android devices

Discussion in 'Unity IAP' started by wouter_vugt, Jun 17, 2019.

  1. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    98
    Unity IAP is not initializing on my phone, but is working correctly on my tablet (including test purchases etc).
    Could there be any reason for this, seems really weird to me?

    thanks
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,855
  3. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    98
    Alright here it is:
    06-30 12:21:20.306 13232 13247 I UnityIAP: Starting in-app billing setup.
    06-30 12:21:20.358 13232 13232 I UnityIAP: Billing service connected.
    06-30 12:21:20.373 13232 13344 I UnityIAP: invoking callback
    06-30 12:21:20.373 13232 13344 I UnityIAP: Checking for in-app billing 3 support.
    06-30 12:21:20.478 13232 13344 I UnityIAP: In-app billing version 3 supported for com.graphicvizion.visualacupuncturefr
    06-30 12:21:20.486 13232 13344 I UnityIAP: Subscriptions AVAILABLE.
    06-30 12:21:20.493 13232 13344 I UnityIAP: Subscription upgrade and downgrade are AVAILABLE.
    06-30 12:21:20.499 13232 13344 I UnityIAP: Subscriptions information parse AVAILABLE.
    06-30 12:21:20.507 13232 13344 I UnityIAP: VR supported.
    06-30 12:21:20.509 13232 13344 I UnityIAP: onIabSetupFinished: 0
    06-30 12:21:20.510 13232 13344 I UnityIAP: Requesting 7 products
    06-30 12:21:20.510 13232 13344 I UnityIAP: QueryInventory: 7
    06-30 12:21:20.510 13232 13344 I UnityIAP: invoking callback
    06-30 12:21:20.510 13232 13344 I UnityIAP: Querying owned items, item type: inapp
    06-30 12:21:20.510 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:21:20.510 13232 13344 I UnityIAP: Calling getPurchases with continuation token: null
    06-30 12:21:20.536 13232 13344 I UnityIAP: Owned items response: 0
    06-30 12:21:20.536 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.extraordinary
    06-30 12:21:20.537 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:21:20.537 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.primarymeridians
    06-30 12:21:20.537 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:21:20.537 13232 13344 I UnityIAP: Continuation token: null
    06-30 12:21:20.537 13232 13344 I UnityIAP: Querying SKU details.
    06-30 12:21:20.649 13232 13344 I UnityIAP: getSkuDetails() failed: 6:Error
    06-30 12:21:20.649 13232 13344 I UnityIAP: onQueryInventoryFinished: false
    06-30 12:21:20.649 13232 13344 I UnityIAP: Error refreshing inventory (querying prices of items). (response: 6:Error)
    06-30 12:21:20.649 13232 13344 I UnityIAP: Failed to Query inventory. UnityIAP will automatically retry in 5000ms
    06-30 12:21:20.650 13232 13344 I UnityIAP: QueryInventory: 7
    06-30 12:21:20.650 13232 13344 I UnityIAP: invoking callback
    06-30 12:21:25.650 13232 13344 I UnityIAP: Querying owned items, item type: inapp
    06-30 12:21:25.650 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:21:25.650 13232 13344 I UnityIAP: Calling getPurchases with continuation token: null
    06-30 12:21:25.662 13232 13344 I UnityIAP: Owned items response: 0
    06-30 12:21:25.662 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.extraordinary
    06-30 12:21:25.662 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:21:25.662 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.primarymeridians
    06-30 12:21:25.662 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:21:25.662 13232 13344 I UnityIAP: Continuation token: null
    06-30 12:21:25.662 13232 13344 I UnityIAP: Querying SKU details.
    06-30 12:21:25.717 13232 13344 I UnityIAP: getSkuDetails() failed: 6:Error
    06-30 12:21:25.717 13232 13344 I UnityIAP: onQueryInventoryFinished: false
    06-30 12:21:25.717 13232 13344 I UnityIAP: Error refreshing inventory (querying prices of items). (response: 6:Error)
    06-30 12:21:25.717 13232 13344 I UnityIAP: Failed to Query inventory. UnityIAP will automatically retry in 10000ms
    06-30 12:21:25.718 13232 13344 I UnityIAP: QueryInventory: 7
    06-30 12:21:25.718 13232 13344 I UnityIAP: invoking callback
    06-30 12:21:31.873 13232 13264 E Unity : java.net.UnknownHostException: Unable to resolve host "cdp.cloud.unity3d.com": No address associated with hostname
    06-30 12:21:31.873 13232 13264 E Unity : #0 0xce0f6cac (libunity.so) ? 0x469cac
    06-30 12:21:31.873 13232 13264 E Unity : #1 0xce68ff5c (libunity.so) ? 0xa02f5c
    06-30 12:21:31.873 13232 13264 E Unity : #2 0xce5cc4ac (libunity.so) ? 0x93f4ac
    06-30 12:21:31.873 13232 13264 E Unity :
    06-30 12:21:31.873 13232 13264 E Unity : (Filename: Line: 451)
    06-30 12:21:31.873 13232 13264 E Unity :
    06-30 12:21:35.721 13232 13344 I UnityIAP: Querying owned items, item type: inapp
    06-30 12:21:35.721 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:21:35.721 13232 13344 I UnityIAP: Calling getPurchases with continuation token: null
    06-30 12:21:35.835 13232 13344 I UnityIAP: Owned items response: 0
    06-30 12:21:35.835 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.extraordinary
    06-30 12:21:35.835 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:21:35.835 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.primarymeridians
    06-30 12:21:35.836 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:21:35.836 13232 13344 I UnityIAP: Continuation token: null
    06-30 12:21:35.836 13232 13344 I UnityIAP: Querying SKU details.
    06-30 12:21:39.624 13232 13344 I UnityIAP: Querying owned items, item type: subs
    06-30 12:21:39.625 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:21:39.625 13232 13344 I UnityIAP: Calling getPurchases with continuation token: null
    06-30 12:21:40.109 13232 13344 I UnityIAP: Owned items response: 0
    06-30 12:21:40.110 13232 13344 I UnityIAP: Continuation token: null
    06-30 12:21:40.110 13232 13344 I UnityIAP: Querying SKU details.
    06-30 12:21:46.317 13232 13344 I UnityIAP: Querying owned items' purchase history, item type: subs
    06-30 12:21:46.318 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:21:46.320 13232 13344 I UnityIAP: Calling getPurchaseHistory with continuation token: null
    06-30 12:21:49.908 13232 13344 I UnityIAP: Purchase history response: 6
    06-30 12:21:49.908 13232 13344 I UnityIAP: getPurchaseHistory() failed: 6:Error
    06-30 12:21:49.914 13232 13344 I UnityIAP: onQueryInventoryFinished: false
    06-30 12:21:49.914 13232 13344 I UnityIAP: Error query Purchase History (response: 6:Error)
    06-30 12:21:49.914 13232 13344 I UnityIAP: Failed to Query inventory. UnityIAP will automatically retry in 20000ms
    06-30 12:21:49.914 13232 13344 I UnityIAP: QueryInventory: 7
    06-30 12:21:49.914 13232 13344 I UnityIAP: invoking callback
    06-30 12:22:09.915 13232 13344 I UnityIAP: Querying owned items, item type: inapp
    06-30 12:22:09.915 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:22:09.915 13232 13344 I UnityIAP: Calling getPurchases with continuation token: null
    06-30 12:22:09.954 13232 13344 I UnityIAP: Owned items response: 0
    06-30 12:22:09.954 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.extraordinary
    06-30 12:22:09.954 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:22:09.954 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.primarymeridians
    06-30 12:22:09.955 13232 13344 I UnityIAP: Sku is owned: com.graphicvizion.visualacupuncturefr.anatomy
    06-30 12:22:09.955 13232 13344 I UnityIAP: Continuation token: null
    06-30 12:22:09.955 13232 13344 I UnityIAP: Querying SKU details.
    06-30 12:22:10.009 13232 13344 I UnityIAP: Querying owned items, item type: subs
    06-30 12:22:10.009 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:22:10.009 13232 13344 I UnityIAP: Calling getPurchases with continuation token: null
    06-30 12:22:10.401 13232 13344 I UnityIAP: Owned items response: 0
    06-30 12:22:10.401 13232 13344 I UnityIAP: Continuation token: null
    06-30 12:22:10.402 13232 13344 I UnityIAP: Querying SKU details.
    06-30 12:22:10.437 13232 13344 I UnityIAP: Querying owned items' purchase history, item type: subs
    06-30 12:22:10.437 13232 13344 I UnityIAP: Package name: com.graphicvizion.visualacupuncturefr
    06-30 12:22:10.437 13232 13344 I UnityIAP: Calling getPurchaseHistory with continuation token: null
    06-30 12:22:19.449 13232 13344 I UnityIAP: Purchase history response: 6
    06-30 12:22:19.449 13232 13344 I UnityIAP: getPurchaseHistory() failed: 6:Error
    06-30 12:22:19.459 13232 13344 I UnityIAP: onQueryInventoryFinished: false
    06-30 12:22:19.459 13232 13344 I UnityIAP: Error query Purchase History (response: 6:Error)
    06-30 12:22:19.459 13232 13344 I UnityIAP: Failed to Query inventory. UnityIAP will automatically retry in 40000ms
    06-30 12:22:19.462 13232 13344 I UnityIAP: QueryInventory: 7
    06-30 12:22:19.462 13232 13344 I UnityIAP: invoking callback
     
  4. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    98
    This fixed it, without changing any code:

    We had the same problem in one of our apps under test mode. Later, we figured out that, we had to clear the Cache of the Google Play Store app.

    So you can try this -

    1. Go your device's Settings menu.
    2. Go to Applications (may also be labeled Application Manager).
    3. Tab over to All Applications.
    4. Search for and open the Google Play Store app. Tap on it, application settings will show
    5. Tap on Clear Data and Clear Cache.

    However, does this mean it is safe to release this way? seems to be an issue with my account somehow.
     
    ibicus likes this.
  5. ibicus

    ibicus

    Joined:
    Feb 28, 2014
    Posts:
    1
    I've got same problem here.

    Looks like that android billing api function "queryPurchaseHistoryAsync" is returning error code 6.
     
  6. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    98
    @JeffDUnity3D Could you please let us know how to fix this?

    Clearing cache and data only worked once, now when I restart I get the same problem.
    I don't know if this would happen to other users as well, I think it is because I made many test purchases and it must have caused an error somehow, which still is a bug but one that most probably would never encounter.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,855
    This looks like recent issue we may have introduced in IAP 1.22 with regard to getPurchaseHistoryAsync returning error code 6. Apparently it doesn't reproduce in Alpha/Beta/Internal testing, but only in release. We have heard reports that it works as expected with Unity IAP 1.19
     
  8. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    98
    I use IAP 1.21..
    Also this is the error "getPurchaseHistory() failed: 6:Error" not the Async version..
    I have released it as is, since it did work on other account and I have used this IAP version before and this was never an issue.

    Please let me eknow if it is safe to release and what this error means.
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,855
    We have determined that this is caused by the user changing their Google password on the web, but not on an unlocked/no screen lock device. We are looking to improve the behavior and work around this Google issue in a future release.