Hello, I am new to the IAP framework. I have been using code-free IAP functionality, but I need some help.
When I started publishing the APP Android phone. It will prompt an error. May I ask what is the reason?
What should i do?
12-31 19:58:08.281 30356-30439/? I/UnityIAP: Querying owned items, item type: subs
12-31 19:58:08.281 30356-30439/? I/UnityIAP: Package name: com.googlepay.game
12-31 19:58:08.281 30356-30439/? I/UnityIAP: Calling getPurchases with continuation token: null
12-31 19:58:08.287 30356-30439/? I/UnityIAP: Owned items response: 0
12-31 19:58:08.287 30356-30439/? I/UnityIAP: Continuation token: null
12-31 19:58:08.287 30356-30439/? I/UnityIAP: Querying SKU details.
12-31 19:58:08.349 30356-30439/? I/UnityIAP: onQueryInventoryFinished: true
12-31 19:58:08.349 30356-30439/? I/UnityIAP: Inventory refresh successful. (response: 0:OK)
12-31 19:58:10.071 30356-30356/? I/ViewRootImpl: finishMotionEvent: handled = true stage=10: View Post IME stage,inputElapseTime=2 eventTime = 88914091 downTime = 88914091 title= com.googlepay.game/com.unity3d.player.UnityPlayerActivity
12-31 19:58:10.174 30356-30375/? I/Unity: IAPButton.PurchaseProduct() with product ID: jb_1
(Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
12-31 19:58:10.208 30356-30375/? I/Unity: NullReferenceException: Object reference not set to an instance of an object
at UnityEngine.Purchasing.IAPButton+IAPButtonStoreManager.InitiatePurchase (System.String productID) [0x00000] in :0
at UnityEngine.Purchasing.IAPButton.PurchaseProduct () [0x00000] in :0
at UnityEngine.Events.InvokableCall.Invoke (System.Object[ ] args) [0x00000] in :0
at UnityEngine.Events.InvokableCallList.Invoke (System.Object[ ] parameters) [0x00000] in :0
at UnityEngine.Events.UnityEventBase.Invoke (System.Object[ ] parameters) [0x00000] in :0
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in :0
at UnityEngine.UI.Button.Press () [0x00000] in :0
at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in :0
at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.
@shengruqing ,
The error is likely due to a store initialization failure:
https://docs.unity3d.com/ScriptReference/Purchasing.InitializationFailureReason.html
We are updating the plugin to give a more meaningful error when this happens.