Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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

Discussion in 'Game Server Hosting' started by morgaxis, Dec 16, 2022.

  1. morgaxis

    morgaxis

    Joined:
    May 25, 2020
    Posts:
    13
    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
     
    MarcSpraragen likes this.
  2. MarcSpraragen

    MarcSpraragen

    Joined:
    Jun 29, 2020
    Posts:
    8
    Same. @morgaxis what device were you building to? I'm using Galaxy S21Ultra. Player settings changed: building for only ARM64. and managed code stripping set to "medium." Here's the relevant part of my logcat output:


    2022/12/19 17:11:48.681 31604 31644 Error Unity Failed to load type initialization for assembly Unity.Netcode.Runtime
    2022/12/19 17:11:48.681 31604 31644 Error Unity UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    2022/12/19 17:11:48.681 31604 31644 Error Unity UnityEngine.Logger:Log(LogType, Object)
    2022/12/19 17:11:48.681 31604 31644 Error Unity UnityEngine.Debug:LogError(Object)
    2022/12/19 17:11:48.681 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.TypeRegistration:RunIfNeeded() (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics\TypeRegistration.cs:39)
    2022/12/19 17:11:48.681 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.MetricIdTypeLibrary:.cctor() (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics\MetricIdTypeLibrary.cs:39)
    2022/12/19 17:11:48.681 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.MetricId:.ctor(Type, Int32) (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics\MetricId\MetricId.cs:45)
    2022/12/19 17:11:48.681 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.MetricId:Create(DirectedMetricType) (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics\MetricId\Metr
    2022/12/19 17:11:48.685 31604 31644 Error Unity Failed to load type initialization for assembly Unity.Multiplayer.Tools.MetricTypes
    2022/12/19 17:11:48.685 31604 31644 Error Unity UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    2022/12/19 17:11:48.685 31604 31644 Error Unity UnityEngine.Logger:Log(LogType, Object)
    2022/12/19 17:11:48.685 31604 31644 Error Unity UnityEngine.Debug:LogError(Object)
    2022/12/19 17:11:48.685 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.TypeRegistration:RunIfNeeded() (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics\TypeRegistration.cs:39)
    2022/12/19 17:11:48.685 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.MetricIdTypeLibrary:.cctor() (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics\MetricIdTypeLibrary.cs:39)
    2022/12/19 17:11:48.685 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.MetricId:.ctor(Type, Int32) (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics\MetricId\MetricId.cs:45)
    2022/12/19 17:11:48.685 31604 31644 Error Unity Unity.Multiplayer.Tools.NetStats.MetricId:Create(DirectedMetricType) (at D:\...\Library\PackageCache\com.unity.multiplayer.tools@1.1.0\NetStats\Runtime\Metrics
    2022/12/19 17:11:48.708 31604 31644 Error Unity ArgumentException: Set Method not found for 'Name'
    2022/12/19 17:11:48.708 31604 31644 Error Unity at System.Reflection.RuntimePropertyInfo.SetValue (System.Object obj, System.Object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0
    2022/12/19 17:11:48.708 31604 31644 Error Unity at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value, System.Object[] index) [0x00000] in <00000000000000000000000000000000>:0
    2022/12/19 17:11:48.708 31604 31644 Error Unity at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value) [0x00000] in <00000000000000000000000000000000>:0
    2022/12/19 17:11:48.708 31604 31644 Error Unity at Unity.Netcode.NetworkBehaviour.InitializeVariables () [0x000dd] in D:\...\Library\PackageCache\com.unity.netcode.gameobjects@1.1.0\Runtime\Core\NetworkBehaviour.cs:596
    2022/12/19 17:11:48.708 31604 31644 Error Unity at Unity.Netcode.NetworkBehaviour.InternalOnNetworkSpawn () [0x0000a] in D:\...\Library\PackageCache\com.unity.netcode.gameobjects@1.1.0\Runtime\Core\NetworkBehaviour
     
  3. morgaxis

    morgaxis

    Joined:
    May 25, 2020
    Posts:
    13
    Hello,

    I am using Lenovo Tab 11, but same problem on Galaxy Tab A10,
    I played with Stripping size but without sucess.

    A small code (just client to connect server a call 1 RPC) is working ....
    with the following settings
    • IL2CPP
    • .NET standard 2.1
    • Faster runtime
    • ..
    • ARMv7
    • ARM64
    • Stripping level = Minimal

    but not my "normal" project
    I downgraded to 2021.3.15f1 LTSthat I had before and it is ok.
     
  4. danri

    danri

    Unity Technologies

    Joined:
    Jun 21, 2019
    Posts:
    27