Search Unity

InvalidOperationException: To listen to deferred purchases, please register a listener

Discussion in 'Unity IAP' started by mattmck92, May 4, 2020.

  1. mattmck92

    mattmck92

    Joined:
    Jan 17, 2018
    Posts:
    1
    Hello, we are getting a lot of reports of this "InvalidOperationException: To listen to deferred purchases, please register a listener via IGooglePlayStoreExtensions" in our unity dash.

    Code (CSharp):
    1. Google.Play.Billing.GooglePlayStoreImpl.Purchase (UnityEngine.Purchasing.ProductDefinition product, System.String developerPayload) (at <00000000000000000000000000000000>:0)
    2. UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product, System.String developerPayload) (at <00000000000000000000000000000000>:0)
    3. UnityEngine.Events.UnityEvent.Invoke () (at <00000000000000000000000000000000>:0)
    4. UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <00000000000000000000000000000000>:0)
    5. UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) (at <00000000000000000000000000000000>:0)
    6. UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () (at <00000000000000000000000000000000>:0)
    7. UnityEngine.EventSystems.StandaloneInputModule.Process () (at <00000000000000000000000000000000>:0)
    8. UnityEngine.EventSystems.StandaloneInputModule:Process()
    We have recently implemented the google billing from https://developer.android.com/google/play/billing/unity. I am aware this error is caused by not enabling deferred purchasing onInitialisation, which I am. I am also blocking users from attempting a purchase if the initialisation fails. Any ideas as too how I can handle this? Cheers.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446