NuclearPowered / Reactor

Modding api for Among Us
https://reactor.gg
GNU Lesser General Public License v3.0
225 stars 43 forks source link

Reactor Is Crashing While Loading #69

Closed RealLakshyaK2011 closed 1 year ago

RealLakshyaK2011 commented 1 year ago

When I Installed Reactor in Among Us, In Top Left Corner, It Is Neither Showing BepInEx Version nor Reactor Version, When I Checked The Log, Reactor Is Getting Errors, Here's The Log:

[Message: Preloader] BepInEx 6.0.0-be.663 - Among Us
[Message: Preloader] Built from commit 5796f535644cb29af2a2d0a3e44fbce21a9baaf3
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 32-bit (x86)
[Info   :   BepInEx] Running under Unity 2020.3.22f1
[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
[Info   :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info   :   BepInEx] 1 plugin to load
[Info   :   BepInEx] Loading [Reactor 2.1.0]
[Info   :Il2CppInterop] Registered mono type Reactor.Utilities.Dispatcher in il2cpp domain
[Info   :Il2CppInterop] Registered mono type Reactor.ReactorPlugin+ReactorComponent in il2cpp domain
[Info   :Il2CppInterop] Registered mono type Reactor.Utilities.Coroutines+Component in il2cpp domain
[Error  :Il2CppInterop] Assembly Il2Cppmscorlib.dll is not registered in il2cpp
[Info   :Il2CppInterop] Registered mono type Reactor.Utilities.Extensions.StreamExtensions+StreamWrapper in il2cpp domain
[Error  :   BepInEx] Error loading [Reactor 2.1.0]: HarmonyLib.HarmonyException: Patching exception in method static System.Collections.Generic.IEnumerable<System.Reflection.MethodBase> Reactor.Networking.Rpc.CustomRpcManager+HandleRpcPatch::TargetMethods()
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeInitializationException: The type initializer for 'HandleRpcPatch' threw an exception.
 ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not find or load a type. (0x80131522)
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Reactor.Networking.Rpc.CustomRpcManager.HandleRpcPatch..cctor() in /_/Reactor/Networking/Rpc/CustomRpcManager.cs:line 81
System.TypeLoadException: Could not find or load a type. (0x80131522)
   --- End of inner exception stack trace ---
   at Reactor.Networking.Rpc.CustomRpcManager.HandleRpcPatch.get_InnerNetObjectTypes() in /_/Reactor/Networking/Rpc/CustomRpcManager.cs:line 81
   at Reactor.Networking.Rpc.CustomRpcManager.HandleRpcPatch.TargetMethods() in /_/Reactor/Networking/Rpc/CustomRpcManager.cs:line 85
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at HarmonyLib.PatchClassProcessor.RunMethod[S,T](T defaultIfNotExisting, T defaultIfFailing, Func`2 failOnResult, Object[] parameters)
   --- End of inner exception stack trace ---
   at HarmonyLib.PatchClassProcessor.ReportException(Exception exception, MethodBase original)
   at HarmonyLib.PatchClassProcessor.Patch()
   at HarmonyLib.Harmony.<PatchAll>b__11_0(Type type)
   at HarmonyLib.CollectionExtensions.Do[T](IEnumerable`1 sequence, Action`1 action)
   at HarmonyLib.Harmony.PatchAll(Assembly assembly)
   at HarmonyLib.Harmony.PatchAll()
   at Reactor.ReactorPlugin.Load() in /_/Reactor/ReactorPlugin.cs:line 65
   at BepInEx.Unity.IL2CPP.IL2CPPChainloader.LoadPlugin(PluginInfo pluginInfo, Assembly pluginAssembly) in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/IL2CPPChainloader.cs:line 134
   at BepInEx.Bootstrap.BaseChainloader`1.LoadPlugins(IList`1 plugins) in /home/runner/work/BepInEx/BepInEx/BepInEx.Core/Bootstrap/BaseChainloader.cs:line 411
[Message:   BepInEx] Chainloader startup complete

Thanks,

TianMengLucky commented 1 year ago

Use BepInEx 6.0.0-be.664

george-ckito commented 1 year ago

I have the same error, Im using BepInEx 6.0.0-be.665

js6pak commented 1 year ago

The issue was caused by a bug in Il2CppInterop which was fixed with BepInEx 6.0.0-be.664