In App Purchase Error in 2018.2.0b3 (Works in 2018.1.0f2)

Hey Guys,

After upgrading my project to 2018.2.0b3 (to fix Physics interpolation issues) I’ve noticed the Unity IAP has stopped working correctly.

To see what’s been going on I’ve used a fresh project and installed the IAP stuff from the Services tab. When trying to make a purchase (using the example Scene) I get the following error:

This is the same error I get in my main project.

As a comparison I did the same on version 2018.1.0f2 and get a purchase successful message. It also works fine in Unity 2017

When I deployed my main project to my Android device I was actually able to make the test purchase (I got a Google receipt etc) but the code that is meant to be activated upon successful purchase was not triggered ( unlocking levels in my case).

Any ideas? I’m at a bit of a loss, I was intending to launch my game this week but this has knocked me back somewhat.

Another developer on my team thinks it could be related to the new Package Manager perhaps?

Advice most appreciated!


Error below for more clarity…

TypeLoadException: Could not load type ‘SimpleJson.SimpleJson’ from assembly ‘UnityEngine.Purchasing’.
UnityEngine.Purchasing.PurchasingManager.OnPurchaseSucceeded (System.String id, System.String receipt, System.String transactionId) (at /Users/justing/development/unity4/Extensions/UnityPurchasing/Runtime/Purchasing/PurchasingManager.cs:111)
UnityEngine.Purchasing.JSONStore.OnPurchaseSucceeded (System.String id, System.String receipt, System.String transactionID)
UnityEngine.Purchasing.FakeStore.<>n__0 (System.String id, System.String receipt, System.String transactionID)
UnityEngine.Purchasing.FakeStore+<>c__DisplayClass15_0.b__0 (Boolean allow, PurchaseFailureReason failureReason)
UnityEngine.Purchasing.UIFakeStore+<>c__DisplayClass14_01[UnityEngine.Purchasing.PurchaseFailureReason].<StartUI>b__0 (Boolean result, Int32 codeValue) UnityEngine.Purchasing.UIFakeStore.OkayButtonClicked () UnityEngine.Purchasing.UIFakeStore.<InstantiateDialog>b__16_1 () UnityEngine.Events.InvokableCall.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:166) UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:58) UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:36) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:45) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:50) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update()

Thank you for reporting this. I will see if I can reproduce here, and if so, I will create the appropriate tracking issue for possible inclusion in a future release. I am also checking with the IAP team to see if there might be a work around in the meantime.

1 Like

Thanks man, if there is a quick fix in the short term, I’d be super grateful.

Cheers

I am seeing the same thing. I will let the IAP team know.

1 Like

Any suggestions for a quick fix on this? I’ve had to completely remove the IAP from our game for the time being. Thanks :slight_smile:

1 Like

Any news about this issue? I still experience it on Unity 2018.2.0b4 with IAP 2.0.0

The SimpleJson issue is currently being investigated by the IAP team. It should be addressed in the next release, no ETA at this time but hopefully very soon.

Thanks for the update Jeff

same here, using b6 i can’t build for UWP using IAP
error:
Reference rewriter: Error: type SimpleJson.SimpleJson doesn’t exist in target framework. It is referenced from UnityEngine.Purchasing.dll at System.String UnityEngine.Purchasing.PurchasingManager::FormatUnifiedReceipt(System.String,System.String).
UnityEngine.Debug:LogError(Object)

Any update on this issue? :slight_smile:

Can you confirm that this is only happening in the Editor, and not on a device?

@erniesbot , @creat327 , @Yanka33

This SimpleJson bug was fixed in the latest version (2.0.3) of the “In App Purchasing” package in the Package Manager. (This is separate from the Unity IAP plugin downloaded from the Services window or Asset Store.)

If you are using Codeless IAP, there is a known issue in 1.19 of the Unity IAP plugin. It will only affect Codeless IAP in the Editor. It does not affect devices. More details here:

Hey thanks for this, I’ll check it out!