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

Failed to generate Il2Cpp interop assemblies (VRising) #866

Closed
Stroichik opened this issue May 9, 2024 · 9 comments · Fixed by #869
Closed

Failed to generate Il2Cpp interop assemblies (VRising) #866

Stroichik opened this issue May 9, 2024 · 9 comments · Fixed by #869
Labels
error Error message or log that may need investigation needs-replication Issue needs to be replicated by BepInEx dev

Comments

@Stroichik
Copy link

What happened?

install BepInEx from Thunderstore
Try launching game
get red errors in console during load, and game doesn't load.

BepInEx Distribution

Bleeding Edge from BepisBuilds

Log outputs

[Message: Preloader] BepInEx 6.0.0-be.668 - VRising
[Message: Preloader] Built from commit 46e297f210c27e9b4d26e7cd326625b53c83faa0
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   :   BepInEx] Running under Unity 2022.3.23f1
[Info   :   BepInEx] Runtime version: 6.0.7
[Info   :   BepInEx] Runtime information: .NET 6.0.7
[Message:InteropManager] Downloading unity base libraries
[Message:InteropManager] Extracting downloaded unity base libraries
[Message:InteropManager] Running Cpp2IL to generate dummy assemblies
[Info   :    Cpp2IL] [Library] Initializing Metadata...
[Info   :    Cpp2IL] [Library] Using actual IL2CPP Metadata version 29,1
[Info   :    Cpp2IL] [Library] Initialized Metadata in 244ms
[Info   :    Cpp2IL] [Library] Using binary type Portable Executable (from LibCpp2IL)
[Info   :    Cpp2IL] [Library] Searching Binary for Required Data...
[Error  :InteropManager] Failed to generate Il2Cpp interop assemblies: Cpp2IL.Core.Exceptions.LibCpp2ILInitializationException: Fatal Exception initializing LibCpp2IL!
 ---> System.Exception: Failed to find Binary code or metadata registration
   at LibCpp2IL.LibCpp2IlBinaryRegistry.CreateAndInit(Byte[] buffer, Il2CppMetadata metadata) in /home/runner/work/Cpp2IL/Cpp2IL/LibCpp2IL/LibCpp2IlBinaryRegistry.cs:line 71
   at LibCpp2IL.LibCpp2IlMain.Initialize(Byte[] binaryBytes, Byte[] metadataBytes, UnityVersion unityVersion) in /home/runner/work/Cpp2IL/Cpp2IL/LibCpp2IL/LibCpp2IlMain.cs:line 159
   at LibCpp2IL.LibCpp2IlMain.LoadFromFile(String pePath, String metadataPath, UnityVersion unityVersion) in /home/runner/work/Cpp2IL/Cpp2IL/LibCpp2IL/LibCpp2IlMain.cs:line 203
   at Cpp2IL.Core.Cpp2IlApi.InitializeLibCpp2Il(String assemblyPath, String metadataPath, UnityVersion unityVersion, Boolean allowUserToInputAddresses) in /_/Cpp2IL.Core/Cpp2IlApi.cs:line 61
   --- End of inner exception stack trace ---
   at Cpp2IL.Core.Cpp2IlApi.InitializeLibCpp2Il(String assemblyPath, String metadataPath, UnityVersion unityVersion, Boolean allowUserToInputAddresses) in /_/Cpp2IL.Core/Cpp2IlApi.cs:line 67
   at BepInEx.Unity.IL2CPP.Il2CppInteropManager.RunCpp2Il() in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/Il2CppInteropManager.cs:line 278
   at BepInEx.Unity.IL2CPP.Il2CppInteropManager.GenerateInteropAssemblies() in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/Il2CppInteropManager.cs:line 213
[Info   : Preloader] 0 patcher plugins loaded
[Info   : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message:   BepInEx] Chainloader initialized

Environment

- OS: Win 10
- BepInEx: 6.0.0-be.668
- Game: VRising
@Stroichik Stroichik added error Error message or log that may need investigation needs-replication Issue needs to be replicated by BepInEx dev labels May 9, 2024
@NeonOby
Copy link

NeonOby commented May 10, 2024

I have the same error with the same method and versions of BepInEx and VRising 1.0!
Maybe the Error Log also helps:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Das System kann die angegebene Datei nicht finden. File name: 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' at BepInEx.Unity.IL2CPP.IL2CPPChainloader.OnInvokeMethod(IntPtr method, IntPtr obj, IntPtr parameters, IntPtr exc)

@rootdarkarchon
Copy link

rootdarkarchon commented May 10, 2024

I can confirm, I have the same issue using the latest V Rising, downloaded from here.

Looks like it's based on some dotnet variant instead of mono, not 100% sure what needs to be done to update BepinEx to run with dotnet. Might be using an outdated BepinEx 6 version.

@mossyblog
Copy link

Even if you do manage to get past this error, It has to do with type registrations as near as i can tell - ClassInjector.RegisterTypeInIl2Cpp will immediately trigger a crash. Given even other projects like UnityExplorer fall victim to the same thing.

@demonkid13579
Copy link

well the game has updated to 1.0 may 8th so might be out of date

@Marinxar
Copy link

Definitely the update. Just got to hope they get time to update soon ^^

@das-eisen
Copy link

Same shit. I've been looking for a solution for two hours, but I haven't found anything (

@NeonOby
Copy link

NeonOby commented May 13, 2024

The solution is to either wait for the VRising Community to fix BepInEx and the mods you want Or to help them if you are a programmer that can.
Search for "vrising mods wiki" should be the first link, there is a discord and pages about the 1.0 update.

Anyway this also seems to be a problem with BepInEx which is not updated for the latest Games build with Unity.
So this probably will happen with more games in the future if BepInEx isn't updated.

@jobsidi
Copy link

jobsidi commented May 14, 2024

Client crashed at the start too:
[Error :InteropManager] Failed to generate Il2Cpp interop assemblies: Cpp2IL.Core.Exceptions.LibCpp2ILInitializationException: Fatal Exception initializing LibCpp2IL! ---> System.Exception: Failed to find Binary code or metadata registration
Tried both IL2CPP or mono from latest bleeding edge builds from
https://builds.bepinex.dev/projects/bepinex_be
no results

@NeonOby
Copy link

NeonOby commented May 14, 2024

The current status is here:
https://wiki.vrisingmods.com/user/game_update
BepInEx and some mods are WIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error Error message or log that may need investigation needs-replication Issue needs to be replicated by BepInEx dev
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants