Search Unity

iOS A type load exception has occurred

Discussion in 'Unity Analytics' started by breban1, Apr 23, 2019.

  1. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    I am receiving an error while running an iOS build on device (Android doesn't show the error). The error is "A type load exception has occurred." and it looks to stem from UnityEngine.Monetization.Analytics:InitializeStandardEvents(). I created a test project that has 1 line of code. It happens with Release or Debug set in build settings, and also with FastButNoExceptions or SlowAndSafe. Any help would be appreciated as I have NO CLUE where to go from here! Thanks!

    Code:
    Monetization.Initialize("<MY GAME ID>", false); // <MY GAME ID> is my actual game ID, but I didn't want to share it in forums

    Using latest Monetization and IAP:
    Unity Monetization 3.0.3
    Unity IAP 1.22.0
    Unity 2017.4.20f1 LTS

    Console:

    Tue 23 04:05:14.958 RemoteConsole YourApp <stdout>: A type load exception has occurred.
    Tue 23 04:05:14.958 RemoteConsole YourApp <stdout>: UnityEngine.Monetization.Analytics:InitializeStandardEvents()
    Tue 23 04:05:14.958 RemoteConsole YourApp <stdout>: UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String, Object)
    Tue 23 04:05:14.958 RemoteConsole YourApp <stdout>: UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String)
    Tue 23 04:05:14.958 RemoteConsole YourApp <stdout>:
    Tue 23 04:05:14.958 RemoteConsole YourApp <stdout>: (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    Tue 23 04:05:14.958 RemoteConsole YourApp <stdout>:
    Tue 23 04:05:14.979 RemoteConsole YourApp <stderr>: 2019-04-23 04:05:15.325 quarterstemp[3634:1350634] A type load exception has occurred.
    Tue 23 04:05:14.979 RemoteConsole YourApp <stderr>: UnityEngine.Monetization.Analytics:InitializeStandardEvents()
    Tue 23 04:05:14.979 RemoteConsole YourApp <stderr>: UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String, Object)
    Tue 23 04:05:14.979 RemoteConsole YourApp <stderr>: UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String)
    Tue 23 04:05:14.979 RemoteConsole YourApp <stderr>:
    Tue 23 04:05:14.979 RemoteConsole YourApp <stderr>: (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
     
    Last edited: Apr 23, 2019
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You should be able to safely ignore the message for now. Can you confirm that it's not a crashing error?
     
  3. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    Thanks for the reply @JeffDUnity3D

    It hasn't crashed my app after the error shows up, but I haven't run it through it's paces. I've tried probably 20-30 runs of the 1-line build and it's been fine so far. When I see "Exception" it usually is a red flag for me, that's why I brought it up.

    100% it's okay to safely ignore? Will a "fix" be put into 2017 LTS? I chose 2017 LTS because stability is of utmost importance. Thanks again.

    EDIT: Talked with Vita over at Unity and this warning will not be removed in 2017 LTS. Thanks again for your help!
     
    Last edited: May 10, 2019