cancel
Showing results for 
Search instead for 
Did you mean: 

SKU is null after purchasing on GearVR, but has the correct value on Rift

edearl
Explorer
We're doing IAP in Unity on both Rift and GearVR. Here's a code excerpt:

Request request = Oculus.Platform.IAP.LaunchCheckoutFlow(productID);
if (request != null)
                    {
                        // Setup callback when complete
                        request.OnComplete(OnPurchasedItem);
                    }

...

        void OnPurchasedItem(Oculus.Platform.Message message)
        {
            if (!message.IsError)
            {
                Oculus.Platform.Models.Purchase purchase = message.GetPurchase();
                if (purchase != null)
                {
                    if (purchase.Sku == null)
                    {
                        Debug.LogError("purchase.Sku is null!");
                    }

Everything was working correctly until yesterday. Now, the purchase completes successfully, but we see "purchase.Sku is null" on GearVR. Rift is still working correctly - we do not see that message.

Does a null message.GetPurchase().Sku indicate an error condition, or not? Why did it change yesterday?

More info: we are testing IAP using Test Users who are subscribed to a release channel; our app is not yet live.
4 REPLIES 4

urban2000
Honored Guest
Hi,

We have the same issue described above in our game. We've disabled our in-game shop for the moment.

Any new info on this issue?

sycx
Explorer
Same issue here. relate logs:
12-26 22:13:44.677 18080 18356 I OVRPlatform: [Purchase] Purchase::deserialize: response object had no field named "sku"
12-26 22:13:44.678 18080 18356 I OVRPlatform: [OVR_Message] ovr_Message_GetPurchase: caught an OVRPlatformException: message is of type Error, use ovr_Message_GetError() instead
12-26 22:13:44.679 18080 18356 I OVRPlatform: [OVR_Purchase] ovr_Purchase_GetExpirationTime: got a null handle, returning a zero value
12-26 22:13:44.683 18080 18356 I OVRPlatform: [OVR_Purchase] ovr_Purchase_GetGrantTime: got a null handle, returning a zero value
12-26 22:13:44.683 18080 18356 I OVRPlatform: [OVR_Purchase] ovr_Purchase_GetPurchaseID: got a null handle, returning a zero value
12-26 22:13:44.684 18080 18356 I OVRPlatform: [OVR_Purchase] ovr_Purchase_GetSKU: got a null handle, returning a zero value

stevenwireless
Explorer


@urban2000

A fix will be pushed for this issue in next week or so.

But for the time being, our paying customers will be super frustrated. Any hotfix we could use?

urban2000
Honored Guest
This is still an issue. We've added the following workaround for our consumable items.

When IAP.LaunchCheckoutFlow finishes and returns a purchase with Sku set to null. We call IAP.GetViewerPurchases. It will return a list of all consumable purchases that have not been consumed yet (including the purchase that just "failed").

We go through the list and call IAP.ConsumePurchase to consume the purchase.