Search Unity

Bug NETCODE] Error Unity Failed to load type initialization for assemby

Discussion in 'Netcode for GameObjects' started by morgaxis, Dec 18, 2022.

  1. morgaxis

    morgaxis

    Joined:
    May 25, 2020
    Posts:
    10
    Hello,
    playing with Client & Server using NETCODE & RPc, everything is ok inside the editor or starting Client / Server using windows batch file
    But building and running the client on Android I got those error inside logcat when StartClient
    any idea ?
    Thanks

    2022/12/16 18:29:23.304 8498 8531 Info Unity [Netcode] Initialize
    2022/12/16 18:29:23.304 8498 8531 Info Unity #0 0x7b2a9e6860 (libunity.so) ? 0x0
    2022/12/16 18:29:23.304 8498 8531 Info Unity #1 0x7b2aed5238 (libunity.so) ? 0x0
    2022/12/16 18:29:23.304 8498 8531 Info Unity #2 0x7b2a703b34 (libunity.so) ? 0x0
    2022/12/16 18:29:23.304 8498 8531 Info Unity #3 0x7b2a703a24 (libunity.so) ? 0x0
    2022/12/16 18:29:23.304 8498 8531 Info Unity #4 0x7b299ab444 (libil2cpp.so) DebugLogHandler_Internal_Log_m20852F18A88BB18425BA07260545E3968F7EA76C 0x58
    2022/12/16 18:29:23.304 8498 8531 Info Unity #5 0x7b299ab51c (libil2cpp.so) DebugLogHandler_LogFormat_m216B169EF9B669F2ED4C59F6B9F326D4EBBDF821 0x70
    2022/12/16 18:29:23.304 8498 8531 Info Unity #6 0x7b26eadb58 (libil2cpp.so) InterfaceActionInvoker4<int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*>::Invoke(unsigned short, Il2CppClass*, Il2CppObject*, int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*) 0x60
    2022/12/16 18:29:23.304 8498 8531 Info Unity #7 0x7b299cf080 (libil2cpp.so) Logger_Log_mEA3D39763D610E92491AA479BA653ECFEE3E9E5C 0x150
    2022/12/16 18:29:23.304 8498 8531 Info Unity #8 0x7b268f765c (libil2cpp.so) InterfaceActionInvoker2<int, Il2CppObject*>::Invoke(unsigned short, Il2CppClass*, Il2CppObject*, int, Il2CppObject*) 0x50
    2022/12/16 18:29:23.304 8498 8531 Info Unity #9 0x7b299abef0 (libil2cpp.so) De
    2022/12/16 18:29:23.494 8498 8531 Error Unity Failed to load type initialization for assembly Unity.Netcode.Runtime
    2022/12/16 18:29:23.494 8498 8531 Error Unity #0 0x7b2a9e6860 (libunity.so) ? 0x0
    2022/12/16 18:29:23.494 8498 8531 Error Unity #1 0x7b2aed5238 (libunity.so) ? 0x0
    2022/12/16 18:29:23.494 8498 8531 Error Unity #2 0x7b2a703b34 (libunity.so) ? 0x0
    2022/12/16 18:29:23.494 8498 8531 Error Unity #3 0x7b2a703a24 (libunity.so) ? 0x0
    2022/12/16 18:29:23.494 8498 8531 Error Unity #4 0x7b299ab444 (libil2cpp.so) DebugLogHandler_Internal_Log_m20852F18A88BB18425BA07260545E3968F7EA76C 0x58
    2022/12/16 18:29:23.494 8498 8531 Error Unity #5 0x7b299ab51c (libil2cpp.so) DebugLogHandler_LogFormat_m216B169EF9B669F2ED4C59F6B9F326D4EBBDF821 0x70
    2022/12/16 18:29:23.494 8498 8531 Error Unity #6 0x7b26eadb58 (libil2cpp.so) InterfaceActionInvoker4<int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*>::Invoke(unsigned short, Il2CppClass*, Il2CppObject*, int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*) 0x60
    2022/12/16 18:29:23.494 8498 8531 Error Unity #7 0x7b299cf080 (libil2cpp.so) Logger_Log_mEA3D39763D610E92491AA479BA653ECFEE3E9E5C 0x150
    2022/12/16 18:29:23.494 8498 8531 Error Unity #8 0x7b268f765c (libil2cpp.so) InterfaceActionInvoker2<int, Il2CppObject*>::Invoke(unsigned short, Il2CppClass*, Il2CppObject*, int, Il2Cp
    2022/12/16 18:29:23.499 8498 8531 Error Unity Failed to load type initialization for assembly Unity.Multiplayer.Tools.MetricTypes
    2022/12/16 18:29:23.499 8498 8531 Error Unity #0 0x7b2a9e6860 (libunity.so) ? 0x0
    2022/12/16 18:29:23.499 8498 8531 Error Unity #1 0x7b2aed5238 (libunity.so) ? 0x0
    2022/12/16 18:29:23.499 8498 8531 Error Unity #2 0x7b2a703b34 (libunity.so) ? 0x0
    2022/12/16 18:29:23.499 8498 8531 Error Unity #3 0x7b2a703a24 (libunity.so) ? 0x0
    2022/12/16 18:29:23.499 8498 8531 Error Unity #4 0x7b299ab444 (libil2cpp.so) DebugLogHandler_Internal_Log_m20852F18A88BB18425BA07260545E3968F7EA76C 0x58
    2022/12/16 18:29:23.499 8498 8531 Error Unity #5 0x7b299ab51c (libil2cpp.so) DebugLogHandler_LogFormat_m216B169EF9B669F2ED4C59F6B9F326D4EBBDF821 0x70
    2022/12/16 18:29:23.499 8498 8531 Error Unity #6 0x7b26eadb58 (libil2cpp.so) InterfaceActionInvoker4<int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*>::Invoke(unsigned short, Il2CppClass*, Il2CppObject*, int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*) 0x60
    2022/12/16 18:29:23.499 8498 8531 Error Unity #7 0x7b299cf080 (libil2cpp.so) Logger_Log_mEA3D39763D610E92491AA479BA653ECFEE3E9E5C 0x150
    2022/12/16 18:29:23.499 8498 8531 Error Unity #8 0x7b268f765c (libil2cpp.so) InterfaceActionInvoker2<int, Il2CppObject*>::Invoke(unsigned short, Il2CppClass*, Il2CppObjec
    2022/12/16 18:29:23.502 8498 8531 Error Unity Failed to load type initialization for assembly Unity.Multiplayer.Tools.NetStatsReporting
    2022/12/16 18:29:23.502 8498 8531 Error Unity #0 0x7b2a9e6860 (libunity.so) ? 0x0
    2022/12/16 18:29:23.502 8498 8531 Error Unity #1 0x7b2aed5238 (libunity.so) ? 0x0
    2022/12/16 18:29:23.502 8498 8531 Error Unity #2 0x7b2a703b34 (libunity.so) ? 0x0
    2022/12/16 18:29:23.502 8498 8531 Error Unity #3 0x7b2a703a24 (libunity.so) ? 0x0
    2022/12/16 18:29:23.502 8498 8531 Error Unity #4 0x7b299ab444 (libil2cpp.so) DebugLogHandler_Internal_Log_m20852F18A88BB18425BA07260545E3968F7EA76C 0x58
    2022/12/16 18:29:23.502 8498 8531 Error Unity #5 0x7b299ab51c (libil2cpp.so) DebugLogHandler_LogFormat_m216B169EF9B669F2ED4C59F6B9F326D4EBBDF821 0x70
    2022/12/16 18:29:23.502 8498 8531 Error Unity #6 0x7b26eadb58 (libil2cpp.so) InterfaceActionInvoker4<int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*>::Invoke(unsigned short, Il2CppClass*, Il2CppObject*, int, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*, String_t*, ObjectU5BU5D_t8061030B0A12A55D5AD8652A20C922FE99450918*) 0x60
    2022/12/16 18:29:23.502 8498 8531 Error Unity #7 0x7b299cf080 (libil2cpp.so) Logger_Log_mEA3D39763D610E92491AA479BA653ECFEE3E9E5C 0x150
    2022/12/16 18:29:23.502 8498 8531 Error Unity #8 0x7b268f765c (libil2cpp.so) InterfaceActionInvoker2<int, Il2CppObject*>::Invoke(unsigned short, Il2CppClass*, Il2Cp
    morgaxis,
     
    rbitard likes this.
  2. yoan22

    yoan22

    Joined:
    Dec 4, 2017
    Posts:
    1
    Hello,
    Uncheck "Strip Engine Code" in PlayerSettings to solve this issue.
     
    Sergei_CHorseGames likes this.
  3. travis-TAP-3D

    travis-TAP-3D

    Joined:
    Sep 12, 2022
    Posts:
    22
    I've unchecked strip engine code as suggested above, but still get this error on latest Unity 2022 LTS and Netcode for GO packages. Has anyone else found a way to resolve it?
     
    sampenguin likes this.
  4. sampenguin

    sampenguin

    Joined:
    Feb 1, 2011
    Posts:
    64
    Also seeing this in Unity 2022.3.9f1 and NcGO 1.5.2 with Strip Engine Code marked as disabled. This was not previously happening a few months ago.

    Curious if others with this issue are using Addressables in your projects? It seems like after I added that, a myriad of weird issues like this started popping up for me in the last few months.
     
  5. FdenUijl

    FdenUijl

    Joined:
    Sep 5, 2019
    Posts:
    29
    Also got this, bump
     
  6. NoelStephens_Unity

    NoelStephens_Unity

    Unity Technologies

    Joined:
    Feb 12, 2022
    Posts:
    258
    Could anyone experiencing this issue on Android determine if they have the multiplayer tools package installed?
    If so, could you see if removing that package (as a test) helps to resolve the issue?
     
  7. Sergei_CHorseGames

    Sergei_CHorseGames

    Joined:
    Jun 27, 2022
    Posts:
    1
    I encountered the same error on Android. Multiplayer tools package version 1.0.0 was installed (Unity version - 2021.3.28). After removing multiplayer tools from the package manager, the error disappeared!
    Thank you very much for the advice!
     
  8. NoelStephens_Unity

    NoelStephens_Unity

    Unity Technologies

    Joined:
    Feb 12, 2022
    Posts:
    258
    For the time being, if you are using the v1.0.0 of the Multiplayer Tools package and making Android builds with "Managed Stripping Level" enabled then you will want to remove the Multiplayer Tools package prior to making your build. It has been confirmed this version of the Multiplayer Tools package will cause the issues described in this thread (only when "Managed Stripping Level" is enabled).

    For those using the v2.0.0 version of the Multiplayer Tools package, this issue does not exist (or at least could not be replicated). If you are using the v2.0.0 version and run across a similar issue please do post here.

    As a side note:
    When making a release build as a release candidate, unless you are including the Runtime Network Stats Monitor as part of your final product, you should go ahead and remove the Multiplayer Tools package anyway as it is a tool primarily used to help with development.
     
    Sergei_CHorseGames likes this.