Search Issue Tracker

Fixed in 2018.2

Fixed in 2018.2

Votes

7

Found in

2018.2.0a3

2018.2.0b3

Issue ID

1035663

Regression

Yes

[IAP] "TypeLoadException" occurs while using "UnityEngine.Purchasing"

IAP

-

Updated package 2.0.3 added to package manager, which should fix SImpleJson load issue when users upgrade from 2.0.1 to 2.0.3. Added fix to allow unity 2018.2 to default to this new package.

Unable to load "SimpleJson.SimpleJson" from assembly 'UnityEngine.Purchasing' exception occurs when the OnPurchaseSucceeded event is called

Steps to Repro:
1. Open the attached or create a new project
2. Window > Services
3. Enable IAP
4. Import IAP package
5. Open "IAP Demo" scene and play scene
6. Execute any dummy purchase

Actual Result:
1. Observe the error in the console
2. Purchase event fails

Note:
1. IAP Integration guide

https://unity3d.com/learn/tutorials/topics/ads-analytics/integrating-unity-iap-your-game

Occurring with:
2018.3.0a1, 2018.2.0b3, 2018.2.0b1, 2018.2.0a5, 2018.2.0a3

Working with:
2018.1.0f2

Environment:
Windows and Mac

StackTrace:
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/stevenb/unity-src3/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.<FakePurchase>b__0 (Boolean allow, PurchaseFailureReason failureReason)
UnityEngine.Purchasing.UIFakeStore+<>c__DisplayClass14_0`1[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.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update()

Comments (6)

  1. 17bf236390eb51707b3ebb63eddf9507?d=mm

    rogerbenson

    May 10, 2019 03:34

    Unity 2018.3.3f1: issue happened with the LWRP asset.
    https://ggstreetview.com Shows an error "Gradle prewarm failed"

  2. 86945bad0e4e1c1fc35f5c1658ea9aab?d=mm

    td-lambda

    Jun 27, 2018 01:27

    It looks like the issue has been fixed in IAP 2.0.3. I had the same error and it went away after updating through package manager.

  3. D93176e12a98f39a0df9f84517d55e9e?d=mm

    AvalonXT

    May 25, 2018 14:57

    Unity 2018.2.0b5 - bug is still there

  4. Dba4bd9513bbf79166bfbdb9094924a6?d=mm

    Yanka33

    May 24, 2018 13:31

    Reproduced using IAP 2.0.0 and Unity 2018.2.0b4

  5. C93165c9bb0bdc3ee0365c61710e2937?d=mm

    pertz

    May 23, 2018 16:11

    Im getting the same error using IAP 1.19.0 and Unity 2018.2.0b2

  6. Fb3db46d3b2ebbef47b230903550a92a?d=mm

    AbyssEnt

    May 16, 2018 17:40

    I have the same error. Slightly different stacktrace, referring to purchase tokens and assemblies. Really need this to be fixed

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.