Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Latest CoreCLR Plugin does not work #1

Closed
1 task done
ertup0 opened this issue Jun 3, 2023 · 17 comments
Closed
1 task done

[Bug]: Latest CoreCLR Plugin does not work #1

ertup0 opened this issue Jun 3, 2023 · 17 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ertup0
Copy link

ertup0 commented Jun 3, 2023

Are you on the latest version of UnityExplorer?

  • Yes, I'm on the latest version of UnityExplorer.

Which release are you using?

BepInEx IL2CPP

Which game did this occur on?

PowerWash Simulator
Unity 2020.3.38f1

Describe the issue.

The game works fine with bepinex but the plugin does not load
Same error and log output on storyteller game

Relevant log output

[Message: Preloader] BepInEx 6.0.0-be.667 - PowerWashSimulator
[Message: Preloader] Built from commit 6b500b35727716f8ba182dedae304a628dbbb608
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   :   BepInEx] Running under Unity 2020.3.38f1
[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 [UnityExplorer 4.9.1]
[Message:UnityExplorer] UnityExplorer 4.9.1 initializing...
[Message:UnityExplorer] [UniverseLib] UniverseLib 1.5.1 initializing...
[Info   :Il2CppInterop] Registered mono type UniverseLib.UniversalBehaviour in il2cpp domain
[Info   :Il2CppInterop] Registered mono type UniverseLib.Runtime.Il2Cpp.Il2CppManagedEnumerator in il2cpp domain
[Message:UnityExplorer] [UniverseLib] Finished UniverseLib initial setup.
[Info   :Il2CppInterop] Registered mono type UnityExplorer.ExplorerBehaviour in il2cpp domain
[Message:UnityExplorer] Initialized UnityCrashPrevention for: Canvas.get_renderingDisplaySize
[Message:   BepInEx] Chainloader startup complete
[Message:UnityExplorer] [UniverseLib] Loaded Unhollowed modules in 3,7410002 seconds.
[Message:UnityExplorer] [UniverseLib] Setup deobfuscation cache in 0,22700001 seconds.
[Message:UnityExplorer] [UniverseLib] Initialized Legacy Input support
[Message:UnityExplorer] [UniverseLib] 	 IL2CPP method has no corresponding pointer, aborting patch of UnityEngine.AssetBundle.UnloadAllAssetBundles
[Info   :Il2CppInterop] Registered mono type UniverseLib.AssetBundle in il2cpp domain
[Warning:UnityExplorer] [UniverseLib] Exception parsing Unity version, falling back to old AssetBundle load method...
[Error  :Il2CppInterop] Exception in IL2CPP-to-Managed trampoline, not passing it to il2cpp: System.TypeInitializationException: The type initializer for 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppStructArray`1' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'Il2CppInterop.Runtime.Il2CppClassPointerStore`1' threw an exception.
 ---> System.InvalidOperationException: Sequence contains more than one matching element
   at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
   at Il2CppInterop.Runtime.Il2CppClassPointerStore`1..cctor() in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppClassPointerStore.cs:line 67
   --- End of inner exception stack trace ---
   at Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppArrayBase`1.StaticCtorBody(Type ownType) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppArrayBase.cs:line 83
   at Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppStructArray`1..cctor() in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppStructArray.cs:line 9
   --- End of inner exception stack trace ---
   at Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppStructArray`1.op_Implicit(T[] arr) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppStructArray.cs:line 48
   at UniverseLib.AssetBundle.LoadFromMemory(Byte[] binary, UInt32 crc)
   at UniverseLib.UI.UniversalUI.LoadBundle(String id)
   at UniverseLib.UI.UniversalUI.LoadBundle()
   at UniverseLib.UI.UniversalUI.Init()
   at UniverseLib.Universe.SetupCoroutine()+MoveNext()
   at UniverseLib.Runtime.Il2Cpp.Il2CppManagedEnumerator.MoveNext()
   at Trampoline_ByteThisUniverseLib.Runtime.Il2Cpp.Il2CppManagedEnumeratorMoveNext(IntPtr , Il2CppMethodInfo* )
@ertup0 ertup0 added the bug Something isn't working label Jun 3, 2023
@ertup0 ertup0 changed the title [Bug]: Latest CoreCLR Plugin doe not work [Bug]: Latest CoreCLR Plugin does not work Jun 3, 2023
@yukieiji
Copy link
Owner

yukieiji commented Jun 6, 2023

Try BepInEx.Unity.IL2CPP.CoreCLR, doesn't that work?

@yukieiji yukieiji added the help wanted Extra attention is needed label Jun 6, 2023
@ertup0
Copy link
Author

ertup0 commented Jun 6, 2023

this is the one that I used. From my testing it gives this error in all games with unity 2020-2021

@yukieiji
Copy link
Owner

yukieiji commented Jun 6, 2023

Tested with AmongUs + BepinEx6.0.0-be.667 and it works fine(BepInEx.Unity.IL2Cpp.CoreCLR).
It doesn't work with "UnityExplorer.BepInEx.IL2CPP.CoreCLR since 6.0.0-be.647, are you sure you are using UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR?

UnityExplorer_be667

@ertup0
Copy link
Author

ertup0 commented Jun 6, 2023

just tried to install it to among us and nope. BepInEx loads but the plugin does not. I used UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR plugin and BepInEx-Unity.IL2CPP-win-x86-6.0.0-be.667

@yukieiji
Copy link
Owner

yukieiji commented Jun 6, 2023

OK. mods installed seem to be fine.

I have some strange things compared to the logs you gave me and my AmongUs logs that are working correctly.

  1. Failure to get Unity version.(AmongUs was created with Unity 2020.3.22f1 and is correctly parsed)
  2. Il2CppStructArray is not registered with Il2Cpp

From the above, try the following.

  1. Remove old BepInEx files(mono folder, BepInEx/patchers, BepInEx/unhollowed, BepInEx/unity-libs, BepInEx/interop)
  2. Clean install of the game. but please delete the mod files manually before installing the game.
  3. According to #424, certain folder paths cause similar symptoms, so change the path where the game is installed.
  4. Do other publicly available mods work properly?

@ertup0
Copy link
Author

ertup0 commented Jun 6, 2023

  1. for some reason my Install doesn't have mono and unhollowed folder.
  2. I installed among us today 35 mins ago just to test the plugin so there are no mods in it
  3. among us and all my games are installed in the default steam directory "C:\Program Files (x86)\Steam\steamapps\common\Among Us"

@yukieiji
Copy link
Owner

yukieiji commented Jun 6, 2023

In 6.0.0-be667, the unhollowed folder is never created, so I think this issue is probably caused by installing a new BepInEx with the old BepInEx still in place.

@yukieiji
Copy link
Owner

yukieiji commented Jun 6, 2023

So if you delete the BepInEx folder and install BepInEx 6.0.0-be.667 and start it, and then install UnityExplorer, it should work.

@ertup0
Copy link
Author

ertup0 commented Jun 6, 2023

But the problem is I never installed other bepinex versions on among us. I downloaded clean version of the game today from steam and then installed 667 version there are no leftovers from old versions

@yukieiji
Copy link
Owner

yukieiji commented Jun 6, 2023

If so, it is probably because the initialization of the first BepInEx failed

@yukieiji
Copy link
Owner

yukieiji commented Jun 6, 2023

I think that the initialization of BepInEx wasn't completed correctly because a large number of files were created during the initialization process, which may have been blocked by security software(Windows Defender, etc...) or because the game was force-quit in the middle of the initialization process, or other factors.

@yukieiji yukieiji added invalid This doesn't seem right and removed bug Something isn't working labels Jun 6, 2023
@ertup0
Copy link
Author

ertup0 commented Jun 6, 2023

okay i just deleted all bepinex folders and reinstalled the game then I downloaded the 667 bepinex build and UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR plugin, disabled Windows defender and I still get the same error log

@ertup0
Copy link
Author

ertup0 commented Jun 6, 2023

If i delete the plugin then there are no errors about Il2Cpp in the log so i think it's not a bepinex problem

@yukieiji
Copy link
Owner

yukieiji commented Jun 7, 2023

Do other publicly available mods work properly?

yukieiji added a commit to yukieiji/UniverseLib that referenced this issue Jun 7, 2023
@yukieiji
Copy link
Owner

yukieiji commented Jun 7, 2023

Here is the build that I tried to fixed the issue that was similar to the UniverseLib issues.
Is it fixed now?
UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR.zip

@ertup0
Copy link
Author

ertup0 commented Jun 7, 2023

Yes, this version works, thank you very much.

@ertup0 ertup0 closed this as completed Jun 7, 2023
@yukieiji
Copy link
Owner

yukieiji commented Jun 7, 2023

fixed in v4.9.2

@yukieiji yukieiji added bug Something isn't working and removed invalid This doesn't seem right labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants