Error Unity TypeLoadException

Hello everyone. After I updated the IAP package to version 2.2.2 my application started to hang on startup. The download process is endless. I have logs from AndroidLogcat https://hatebin.com/utlhjmvpzm. This is the only difference between the previous working version and the current one. The current version of services is 2.2.5. I assume that the second log, which is related to the NullReferenceException, occurs due to the fact that due to the problem that the first log causes, the dependencies in Zenject are not initialized. I suppose that the problem should be looked for in the first log, but searches on the Internet did not lead to anything.

Please don’t post external links, I’m certainly not clicking on Hate Bin! Ensure you are using version 2.2.7 of the asset and 2.2.2 of the In App Purchasing library in Package Manager (you need both). We don’t need the full logs, just the error for now, we may need steps to reproduce if you still see the issue with the latest version. You can check your version and update via menu Window/Unity IAP/IAP Updates…

2021/02/09 22:46:13.652 11854 11944 Error Unity TypeLoadException: VTable setup of type UnityEngine.Purchasing.ScriptingStoreCallback failed
2021/02/09 22:46:13.652 11854 11944 Error Unity at UnityEngine.Purchasing.PurchasingManager.Initialize (UnityEngine.Purchasing.IInternalStoreListener listener, System.Collections.Generic.HashSet1[T] products) [0x00007] in <b895a98b62a84b1ba67f987036ea0404>:0 2021/02/09 22:46:13.652 11854 11944 Error Unity at UnityEngine.Purchasing.UnityPurchasing+<>c__DisplayClass2_0.<Initialize>b__0 (System.Collections.Generic.HashSet1[T] response) [0x00000] in :0
2021/02/09 22:46:13.652 11854 11944 Error Unity at UnityEngine.Purchasing.UnityPurchasing.FetchAndMergeProducts (System.Boolean useCatalog, System.Collections.Generic.HashSet1[T] localProductSet, UnityEngine.Purchasing.Extension.ICatalogProvider catalog, System.Action1[T] callback) [0x0002d] in :0
2021/02/09 22:46:13.652 11854 11944 Error Unity at UnityEngine.Purchasing.UnityPurchasing.Initialize (UnityEngine.Purchasing.IStoreListener listener, UnityEngine.Purchasing.ConfigurationBuilder builder, UnityEngine.ILogger logger, System.String persistentDatapath, UnityEngine.Purchasing

2021/02/09 22:46:13.754 11854 11944 Error Unity NullReferenceException: Object reference not set to an instance of an object
2021/02/09 22:46:13.754 11854 11944 Error Unity at UnityEngine.Purchasing.ReflectionUtils.HasMethodInInterface (System.Object objectToCheck, System.String methodName) [0x00001] in <1c0ec83d37494ae3910e13e77b7f7f61>:0
2021/02/09 22:46:13.754 11854 11944 Error Unity at UnityEngine.Purchasing.GoogleFetchPurchases.OnFetchedPurchaseSuccessful (System.Collections.Generic.List1[T] purchases, System.Boolean shouldReturnNonAcknowledgedPurchases) [0x0000d] in <1c0ec83d37494ae3910e13e77b7f7f61>:0 2021/02/09 22:46:13.754 11854 11944 Error Unity at UnityEngine.Purchasing.GoogleFetchPurchases+<>c__DisplayClass6_0.<FetchPurchases>b__0 (System.Collections.Generic.List1[T] purchases) [0x00001] in <1c0ec83d37494ae3910e13e77b7f7f61>:0
2021/02/09 22:46:13.754 11854 11944 Error Unity at UnityEngine.Purchasing.GoogleQueryPurchasesService.HandleOnQueryPurchaseReceived (System.Action1[T] onQueryPurchaseSucceed, System.Collections.Generic.List1[T] googlePurchasesInSubs, System.Collections.Generic.List`1[T] googlePurchasesInApps) [0x0001a] in <1c0ec83d37494ae3910e13e77b7f7f61>:0
2021/02/09 22:46:13.754 11854 11944 Error Unity at UnityEngine.Purchasing.GoogleQueryPurchasesServ

Can I somehow upgrade to 2.2.7 without using the IAP Installer?

Please elaborate, why would you not use the installer? Such an install would not be supported. I suppose you could try using the installer on a new project, write down all the files it imports, then copy them. Ensure to make a back up first! But what is the error? What is Zenject? Please compare to a brand new project and import the latest IAP. Then see what is different between the new project and your base project.

Use version 2.2.1

Have you experienced the same issue? 2.2.1 is not the latest version.

I’m having the same problem.
There is no post-build error until 2.2.1, but after updating 2.2.2, this phenomenon occurs. (VTable setup)

Please provide specific steps to reproduce with a new project, or the Sample IAP Project https://discussions.unity.com/t/700293 . Often restarting and reloading the project can clear these errors.