BepInEx / Il2CppInterop

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

InjectorHelpers.FindGenericMethodGetMethod() - System.InvalidOperationException: Sequence contains more than one element #111

Closed p1xel8ted closed 5 hours ago

p1xel8ted commented 8 months ago

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

ErrorLog.log LogOutput.log

p1xel8ted commented 8 months ago

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.

karaok1 commented 5 months ago

Any temporary fix?

p1xel8ted commented 5 months ago

No (apart from what's already listed)

jellejurre commented 1 month ago

This seems to happen on any 2022.3.22f1 build using UnityExplorer.

2022.3.6f1 does work with UnityExplorer

ds5678 commented 10 hours ago

Duplicate of #119