Search Issue Tracker
Fixed in 2018.2.X
Votes
7
Found in
2018.2.0a3
2018.2.0b3
Issue ID
1035663
Regression
Yes
[IAP] "TypeLoadException" occurs while using "UnityEngine.Purchasing"
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 (9)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Errors are logged when importing an asset at a path with Firebase
- Entering too big of a number in 2D Renderer Lightmode Tags freezes the Editor
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
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.
AvalonXT
May 25, 2018 14:57
Unity 2018.2.0b5 - bug is still there
Yanka33
May 24, 2018 13:31
Reproduced using IAP 2.0.0 and Unity 2018.2.0b4
pertz
May 23, 2018 16:11
Im getting the same error using IAP 1.19.0 and Unity 2018.2.0b2
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