BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
185 stars 59 forks source link

Couldn't find System.Type for Il2Cpp type: System. #117

Closed karaok1 closed 1 month ago

karaok1 commented 6 months ago

For the last few months I have been facing a randomly occurring problem, no plugins installed just trying to run BepInEx. This happens with some game updates, and with other updates it fixes itself. What do you think may cause this issue?

[Message: Preloader] BepInEx 6.0.0-be.682 - Seafight
[Message: Preloader] Built from commit 910844a982dbb126d0c6544847424bc42fb7849c
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 32-bit (x86)
[Info   :   BepInEx] Running under Unity 2022.3.8f1
[Info   :   BepInEx] Runtime version: 6.0.7
[Info   :   BepInEx] Runtime information: .NET 6.0.7
[Info   : Preloader] 0 patcher plugins loaded
[Info   : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message:   BepInEx] Chainloader initialized
[Fatal  :   BepInEx] Unable to execute IL2CPP chainloader
[Error  :   BepInEx] System.NullReferenceException: Couldn't find System.Type for Il2Cpp type: System.
   at Il2CppInterop.Runtime.Injection.ClassInjector.SystemTypeFromIl2CppType(Il2CppTypeStruct* typePointer) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/ClassInjector.cs:line 1144
   at Il2CppInterop.Runtime.Injection.ClassInjector.RegisterTypeInIl2Cpp(Type type, RegisterTypeOptions options) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/ClassInjector.cs:line 432
   at Il2CppInterop.Runtime.DelegateSupport.ConvertDelegate[TIl2Cpp](Delegate delegate) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/DelegateSupport.cs:line 244
   at UnityEngine.Application.LogCallback.op_Implicit(Action`3 )
   at BepInEx.Unity.IL2CPP.Logging.IL2CPPUnityLogSource..ctor() in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/Logging/IL2CPPUnityLogSource.cs:line 11
   at BepInEx.Unity.IL2CPP.IL2CPPChainloader.OnInvokeMethod(IntPtr method, IntPtr obj, IntPtr parameters, IntPtr exc) in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/IL2CPPChainloader.cs:line 88
ds5678 commented 1 month ago

Duplicate of #135