Il2CppInterop
Il2CppInterop copied to clipboard
InjectorHelpers.FindGenericMethodGetMethod() - System.InvalidOperationException: Sequence contains more than one element
Star Ocean Second Story R Prince of Persia The Lost Crown BepInEx 6.0.0-be.682
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message: BepInEx] Chainloader initialized
[Fatal : BepInEx] Unable to execute IL2CPP chainloader
[Error : BepInEx] System.InvalidOperationException: Sequence contains more than one element
at System.Linq.ThrowHelper.ThrowMoreThanOneElementException()
at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Il2CppInterop.Runtime.Injection.InjectorHelpers.FindGenericMethodGetMethod() in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/InjectorHelpers.cs:line 163
at Il2CppInterop.Runtime.Injection.InjectorHelpers.Setup() in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/InjectorHelpers.cs:line 67
at Il2CppInterop.Runtime.Injection.ClassInjector.RegisterTypeInIl2Cpp(Type type, RegisterTypeOptions options) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/ClassInjector.cs:line 188
at Il2CppInterop.Runtime.DelegateSupport.ConvertDelegate[TIl2Cpp](Delegate delegate) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/DelegateSupport.cs:line 242
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
Setting UnityLogListening to False resolves this
UnityExplorer is a no go because you can't disable it.
EDIT - Anything that attempts to attach to the SceneManager.OnSceneLoaded action results in the above error.
Any temporary fix?
No (apart from what's already listed)
This seems to happen on any 2022.3.22f1 build using UnityExplorer.
2022.3.6f1 does work with UnityExplorer
Duplicate of #119