Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Fatal error in Unity CIL Linker Mono.Linker.MarkException: Error processing method:

Discussion in 'Testing & Automation' started by Kalita2127, Jun 23, 2023.

  1. Kalita2127

    Kalita2127

    Joined:
    Dec 6, 2014
    Posts:
    279
    I want to build selected test in WebGL but I got the following erros:

    Code (CSharp):
    1. Exception: Failed running C:\Program Files\Unity\Hub\Editor\2020.3.38f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @"C:/Users/SHINTA VR/Documents/Fork/cosmize-experience-unity/Temp/StagingArea/Data/Managed/response.rsp"
    2.  
    3. stdout:
    4. Fatal error in Unity CIL Linker
    5. Mono.Linker.MarkException: Error processing method: 'System.Boolean Cosmize.Test.PlayTest.Member.EventRoomTests/<>c::<LoadScene>b__4_2()' in assembly: 'EventRoomTestsMember.dll'
    6. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Collections.Generic.List`1<Cosmize.Data.EventData> Cosmize.Feature.Event.EventManager::eventDataList
    7.    at Mono.Linker.Steps.MarkStep.HandleUnresolvedField(FieldReference reference)
    8.    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
    9.    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    10.    at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
    11.    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    12.    at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method)
    13.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    14.    --- End of inner exception stack trace ---
    15.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    16.    at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
    17.    at Mono.Linker.Steps.MarkStep.Process()
    18.    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    19.    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    20.    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    21.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    22.    at Mono.Linker.Pipeline.Process(LinkContext context)
    23.    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
    24.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
    25.    at Unity.Linker.UnityDriver.RunDriver()
    26. stderr:
    27.  
    28. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    29. UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    30. UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    31. UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    32. UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    33. UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    34. UnityEditorInternal.IL2CPPBuilder.Run () (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    35. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    36. UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
    37. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:913)
    38. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    39. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2e00be109d124bb98c380f10ba0e3cd4>:0)
    40. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    Code (CSharp):
    1. TestLaunchFailedException: Player build failed
    2. UnityEditor.TestTools.TestRunner.PlayerLauncher.Run () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs:93)
    3. UnityEditor.TestTools.TestRunner.TestRun.Tasks.LegacyPlayerRunTask+<Execute>d__0.MoveNext () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs:14)
    4. UnityEditor.TestTools.TestRunner.TestRun.TestJobRunner.ExecuteStep () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestRun/TestJobRunner.cs:124)
    5. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    What's causes this errors? I'm using Unity 2020.3.38f1 and UTF 1.1.31
     
    Last edited: Jun 23, 2023
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,934
    Sounds like a missing dependency. Does it build in the editor or playmode?
     
  3. Kalita2127

    Kalita2127

    Joined:
    Dec 6, 2014
    Posts:
    279
    It's playmode. And we found that the obfuscator plugin was the culprit