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.

Bug Error building IL2CPP/ARM64 to Android phone, Failed running UnityLinker.exe, Unity.RuntimeSceneSeri

Discussion in 'Android' started by osimaleki, Mar 19, 2021.

  1. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    I am getting a weird build error I can't figure out.

    If I run on Mondo/Arm7 it builds fine. Running IL2CPP/ARM64 I get this error:

    "Failed to resolve assembly: 'Unity.RuntimeSceneSerialization, Version=0.0.0.0..."

    I should add:

    - I am using the preview package UI Builder
    - I am using MARS/AR foundations so I need IL2CPP/ARM64

    Full call stack:

    Exception: Failed running D:\UnityEditors\2020.3.0f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @D:/XR/WanderingStar/Temp/StagingArea/assets/bin/Data/Managed/response.rsp

    stdout:
    Fatal error in Unity CIL Linker
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Unity.RuntimeSceneSerialization, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
    at Unity.Linker.EngineStripping.EngineModule.ResolvedReferences(UnityLinkContext context)+MoveNext()
    at Unity.Linker.Steps.Marking.EngineStrippingMarking.MarkModuleReferences(EngineModule module, Boolean markEngineModule)
    at Unity.Linker.Steps.Marking.EngineStrippingMarking.MarkModule(EngineModule module, Boolean markEngineModule)
    at Unity.Linker.Steps.Marking.EngineStrippingMarking.MarkModuleOf(IMemberDefinition member)
    at Unity.Linker.Steps.Marking.EngineStrippingMarking.DoAdditionalFieldProcessing(FieldDefinition field)
    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalFieldProcessing(FieldDefinition field)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
    at Unity.Linker.Steps.UnityMarkStep.Unity.Linker.Steps.Marking.IMarkStepCallbacks.MarkField(FieldReference reference)
    at Unity.Linker.Steps.Marking.BaseMarkStepExtension.MarkField(FieldReference reference)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.MarkNeededFields(TypeDefinition type)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.DoAdditionalTypeProcessing(TypeDefinition type)
    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
    at Unity.Linker.Steps.UnityMarkStep.Unity.Linker.Steps.Marking.IMarkStepCallbacks.MarkField(FieldReference reference)
    at Unity.Linker.Steps.Marking.BaseMarkStepExtension.MarkField(FieldReference reference)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.MarkNeededFields(TypeDefinition type)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.DoAdditionalTypeProcessing(TypeDefinition type)
    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field)
    at Mono.Linker.Steps.MarkStep.MarkEntireType(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
    at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
    at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
    at Mono.Linker.Steps.MarkStep.Initialize()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
    at Unity.Linker.UnityDriver.RunDriver()
    stderr:

    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
    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 <50f55621a2ca4f31a35283e2979a8bf5>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    Thank you!
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,402
    Do you know how the Unity.RuntimeSceneSerialization.dll assembly ends up in this project? I'm unclear where it might come from. Another assembly seems to be referencing it, and it cannot be found.
     
  3. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    Not sure. Any suggestions on how to check?

    These are the packages I have.



    Should I try uninstalling each one to see?
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,402
    If it is possible to remove them one by one, that might help here. I'm nots sure which, if any of them, use Unity.RuntimeSceneSerialization.
     
  5. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    So took me a while but uninstalling MARS did the trick. Will try to reinstall tomorrow to see if the problem comes back.

    Thank you for the continued help Josh!
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,402
    Thanks! If you can reproduce the issue by installing MARS again, please submit a bug report, we will correct it.
     
  7. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    Thank you! Will do.
     
  8. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    Hey Josh,

    We are now at the stage of our project that we are going to develop the AR components. I installed MARS and same error again.

    I submitted a bug report. How do I track the status?

    Thank you!
     
    mossbeard1 likes this.
  9. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    Found the issue. The issue was with the MARS companion package. Removing just that solved the issue.

    I will try to add that to the bug report as well.
     
    mossbeard1 likes this.
  10. mossbeard1

    mossbeard1

    Joined:
    May 3, 2018
    Posts:
    1
    wow your an angel its been 3 days of this for me