Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question What is Mono.Linker.LinkerFatalErrorException?

Discussion in 'Editor & General Support' started by unity_6E49E1A3054786707CE1, May 12, 2023.

  1. unity_6E49E1A3054786707CE1

    unity_6E49E1A3054786707CE1

    Joined:
    May 12, 2023
    Posts:
    2
    Hello.
    I am new to Unity development and would like to know how to resolve the following error content.
    (The editor version is 2021.3.5f1)
    The content is probably a linker error (error IL1005), but I am not sure how to fix it.

    I would appreciate any advice you could give me.

    Code (CSharp):
    1. Building Library\Bee\artifacts\Android\ManagedStripped failed with output:
    2. C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=C:/UnityProject/ProjectName/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/Android/ManagedStripped --include-link-xml=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-link-xml=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed\SerializedTypes.xml --include-link-xml=C:/Program Files/Unity/Hub/Editor/2021.3.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/AndroidNativeLink.xml --include-directory=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --platform=Android --use-editor-options --editor-settings-flag=None,Development --enable-engine-module-stripping --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2021.3.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/modules.asset --editor-data-file=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.Voice.Demo.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.AudioManager.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Meta.VoiceSDK.Mic.Common.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.Interaction.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/AssistantCoreSDKRuntime.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Meta.WitAi.Conduit.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.Interaction.OVR.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Meta.WitAi.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Facebook.Wit.Dictation.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.VR.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Unity.XR.Management.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Meta.WitAi.TTS.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.Interaction.OVR.Samples.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Meta.VoiceSDK.Mic.Other.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.Spatializer.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/VoiceSDK.Dictation.Runtime.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.Platform.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Meta.WitAi.TTS.Samples.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Oculus.LipSync.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Unity.XR.Oculus.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/VoiceSDK.Runtime.dll --include-unity-root-assembly=C:/UnityProject/MetaverseGamelift/Temp/StagingArea/Data/Managed/Meta.WitAi.Lib.dll --print-command-line
    3. Fatal error in Unity CIL Linker
    4. Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: Amazon.Runtime.Internal.Util.InternalLog4netLogger.loadStatics(): Error processing method 'Amazon.Runtime.Internal.Util.InternalLog4netLogger.loadStatics()' in assembly 'AWSSDK.Core.dll'
    5. ---> System.InvalidOperationException: No action for the assembly log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a defined
    6.    at Mono.Linker.AnnotationStore.GetAction(AssemblyDefinition assembly)
    7.    at Mono.Linker.Steps.MarkStep.IsFullyPreserved(TypeDefinition type)
    8.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    9.    at Mono.Linker.Steps.MarkStep.MarkTypeVisibleToReflection(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    10.    at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.<>c__DisplayClass20_4.<HandleCall>b__7()
    11.    at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.HandleCall(MethodBody callingMethodBody, MethodReference calledMethod, Instruction operation, ValueNodeList methodParams, ValueNode& methodReturnValue)
    12.    at Mono.Linker.Dataflow.MethodBodyScanner.HandleCall(MethodBody callingMethodBody, Instruction operation, Stack`1 currentStack)
    13.    at Mono.Linker.Dataflow.MethodBodyScanner.Scan(MethodBody methodBody)
    14.    at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.ScanAndProcessReturnValue(MethodBody methodBody)
    15.    at Unity.Linker.Steps.UnityMarkStep.MarkReflectionLikeDependencies(MethodBody body, Boolean requiresReflectionMethodBodyScanner)
    16.    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    17.    at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
    18.    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
    19.    at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
    20.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    21.    --- End of inner exception stack trace ---
    22.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    23.    at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
    24.    at Mono.Linker.Steps.MarkStep.Process()
    25.    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    26.    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    27.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    28.    at Mono.Linker.Pipeline.Process(LinkContext context)
    29.    at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
    30.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
    31.    at Unity.Linker.UnityDriver.RunDriver()
    32. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
     
  2. unity_6E49E1A3054786707CE1

    unity_6E49E1A3054786707CE1

    Joined:
    May 12, 2023
    Posts:
    2
    Sorry.
    I updated the editor version to the latest one and that solved the problem.
    However, I regret to say that I am not certain what factor solved this :(
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,561
    Yeah, sometimes that is a thing, alas.

    Glad you're back online anyway!

    Here's my go-to build troubleshooting list:

    How to troubleshoot build failures:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

    Until you can build a blank project to the target platform, don't fiddle with anything else.

    Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

    Most often things that prevent building are third-party libraries such as Firebase.

    Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

    It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

    Android build not building:

    Recently (circa July 2022) there have been reports of Unity's installer failing to install the Android Tools.

    https://forum.unity.com/threads/cant-build-for-android.1306098/

    Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022:

    https://forum.unity.com/threads/aab...y-2021-3-8-with-jdk-1-8.1322211/#post-8551193

    Android Gradle errors and other related stuff:

    https://forum.unity.com/threads/unity-gradle-bug-please-help.1368018/#post-8625789