Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Error Unity TypeLoadException

Discussion in 'Unity IAP' started by matbee04, Feb 9, 2021.

  1. matbee04

    matbee04

    Joined:
    Jan 30, 2018
    Posts:
    5
    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.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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...
     
    Last edited: Feb 9, 2021
  3. matbee04

    matbee04

    Joined:
    Jan 30, 2018
    Posts:
    5
    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.HashSet`1[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.HashSet`1[T] response) [0x00000] in <b895a98b62a84b1ba67f987036ea0404>:0
    2021/02/09 22:46:13.652 11854 11944 Error Unity at UnityEngine.Purchasing.UnityPurchasing.FetchAndMergeProducts (System.Boolean useCatalog, System.Collections.Generic.HashSet`1[T] localProductSet, UnityEngine.Purchasing.Extension.ICatalogProvider catalog, System.Action`1[T] callback) [0x0002d] in <b895a98b62a84b1ba67f987036ea0404>: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.List`1[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.List`1[T] purchases) [0x00001] in <1c0ec83d37494ae3910e13e77b7f7f61>:0
    2021/02/09 22:46:13.754 11854 11944 Error Unity at UnityEngine.Purchasing.GoogleQueryPurchasesService.HandleOnQueryPurchaseReceived (System.Action`1[T] onQueryPurchaseSucceed, System.Collections.Generic.List`1[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
     
  4. matbee04

    matbee04

    Joined:
    Jan 30, 2018
    Posts:
    5
    Can I somehow upgrade to 2.2.7 without using the IAP Installer?
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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.
     
  6. gydronik

    gydronik

    Joined:
    Oct 20, 2012
    Posts:
    8
    Use version 2.2.1
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Have you experienced the same issue? 2.2.1 is not the latest version.
     
  8. gameproj

    gameproj

    Joined:
    Sep 26, 2014
    Posts:
    3
    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)
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please provide specific steps to reproduce with a new project, or the Sample IAP Project https://forum.unity.com/threads/sample-iap-project.529555/ . Often restarting and reloading the project can clear these errors.