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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Unity Forma WebGL Build Error

Discussion in 'Unity Forma' started by Avigar, Mar 2, 2022.

  1. Avigar

    Avigar

    Joined:
    Jan 26, 2019
    Posts:
    2
    Hello,

    I’m having trouble building the Unity Forma Sample Project in WebGL. I’m using Unity Forma 3.0.4 and Unity editor 2020.3.25, the project is just as it was installed from the Unity Forma 3.0.4 Installer. Whenever I try to build the project in WebGL I get the following error:

    Code (csharp):
    1. Exception: Failed running C:\Program Files\Unity\2020.3.25f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @C:/Users/ricky/Desktop/unity-forma-sample-project-3.0.4/SampleProject-URP/Temp/StagingArea/Data/Managed/response.rsp
    2.  
    3. stdout:
    4. Fatal error in Unity CIL Linker
    5. Mono.Linker.Steps.XmlResolutionException: Failed to process XML description: C:\Users\ricky\Desktop\unity-forma-sample-project-3.0.4\SampleProject-URP\Assets\StreamingAssets\aa\AddressablesLink\link.xml
    6.  ---> System.ArgumentException: Name can not be empty
    7.    at Mono.Cecil.AssemblyNameReference.Parse(String fullName)
    8.    at Mono.Linker.Steps.ResolveFromXmlStep.GetAssemblyName(XPathNavigator nav)
    9.    at Unity.Linker.Steps.Resolution.UnityResolveFromXmlStep.GetAssemblyName(XPathNavigator nav)
    10.    at Unity.Linker.Steps.Resolution.UnityResolveFromXmlStep.ProcessAssemblies(LinkContext context, XPathNodeIterator iterator)
    11.    at Mono.Linker.Steps.ResolveFromXmlStep.Process()
    12.    --- End of inner exception stack trace ---
    13.    at Mono.Linker.Steps.ResolveFromXmlStep.Process()
    14.    at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
    15.    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    16.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    17.    at Mono.Linker.Pipeline.Process(LinkContext context)
    18.    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
    19.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
    20.    at Unity.Linker.UnityDriver.RunDriver()
    21. stderr:
    22.  
    23. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    24. UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    25. UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    26. UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    27. UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    28. UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    29. UnityEditorInternal.IL2CPPBuilder.Run () (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    30. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    31. UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
    32. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:913)
    33. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    34. 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 <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    35. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    36. Unity.Industrial.Forma.Editor.Build.BuildHelper:BuildOnTarget(SupportedBuildTarget, BuildProfile, String[], Boolean, Boolean, Boolean, List`1, Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/BuildHelper/BuildHelper.cs:1222)
    37. Unity.Industrial.Forma.Editor.Build.BuildHelper:DoBuild(BuildProfile, Boolean, Boolean, List`1, Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/BuildHelper/BuildHelper.cs:484)
    38. Unity.Industrial.Forma.Editor.Build.BuildHelper:BuildPlatform(BuildProfile, Boolean, Boolean, List`1, Boolean, Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/BuildHelper/BuildHelper.cs:390)
    39. Unity.Industrial.Forma.Editor.UI.Components.BuildTargetBase:Build(Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/UI/Configurator/Components/ExportProfileDetails/BuildTargetBase.cs:368)
    40. Unity.Industrial.Forma.Editor.UI.Components.<>c__DisplayClass13_0:<GetBuildAction>b__0() (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/UI/Configurator/Components/ExportProfileDetails/BuildTargetBase.cs:144)
    41. Unity.Industrial.Forma.Editor.UI.ActionSelectorButton:ClickableAction() (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/UI/Common/ActionSelectorButton.cs:128)
    42. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

    I tried to disable Managed Code Stripping but the option is just not there, I guess this is because the default scripting backend is set to IL2CPP but I have no way to change it from the project settings. I tried editing the link.xml file but any change I make to it is reverted whenever I try to build, the file just seems to be automatically created on build.
    I also tried building after upgrading the project to Unity 2021.1.5 but when I build with that version I get another error related to the Unity Linker:


    Code (csharp):
    1. Exception: Failed running C:\Program Files\Unity\Hub\Editor\2021.1.5f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @C:/Users/ricky/Desktop/unity-forma-sample-project-3.0.4/SampleProject-URP/Temp/StagingArea/Data/Managed/response.rsp
    2.  
    3. stdout:
    4. Fatal error in Unity CIL Linker
    5. Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'UnityEngine.TextCoreTextEngineModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
    6.    at Unity.Linker.EngineStripping.EngineModule.ResolvedReferences(UnityLinkContext context)+MoveNext()
    7.    at Unity.Linker.Steps.Marking.EngineStrippingMarking.MarkModuleReferences(EngineModule module, Boolean markEngineModule)
    8.    at Unity.Linker.Steps.Marking.EngineStrippingMarking.MarkModule(EngineModule module, Boolean markEngineModule)
    9.    at Unity.Linker.Steps.Marking.EngineStrippingMarking.MarkModuleOf(IMemberDefinition member)
    10.    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalFieldProcessing(FieldDefinition field)
    11.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    12.    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference, DependencyInfo reason)
    13.    at Unity.Linker.Steps.UnityMarkStep.Unity.Linker.Steps.Marking.IMarkStepCallbacks.MarkField(FieldReference reference, DependencyInfo& reason)
    14.    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.MarkNeededFields(TypeDefinition type)
    15.    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.DoAdditionalTypeProcessing(TypeDefinition type)
    16.    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    17.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    18.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    19.    at Mono.Linker.Steps.MarkStep.MarkFields(TypeDefinition type, Boolean includeStatic, DependencyInfo& reason, Boolean markBackingFieldsOnlyIfPropertyMarked)
    20.    at Mono.Linker.Steps.MarkStep.MarkImplicitlyUsedFields(TypeDefinition type)
    21.    at Mono.Linker.Steps.MarkStep.MarkRequirementsForInstantiatedTypes(TypeDefinition type)
    22.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    23.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    24.    at Mono.Linker.Steps.MarkStep.MarkFields(TypeDefinition type, Boolean includeStatic, DependencyInfo& reason, Boolean markBackingFieldsOnlyIfPropertyMarked)
    25.    at Mono.Linker.Steps.MarkStep.MarkImplicitlyUsedFields(TypeDefinition type)
    26.    at Mono.Linker.Steps.MarkStep.MarkRequirementsForInstantiatedTypes(TypeDefinition type)
    27.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    28.    at Mono.Linker.Steps.MarkStep.MarkGenericArguments(IGenericInstance instance, IMemberDefinition sourceLocationMember)
    29.    at Mono.Linker.Steps.MarkStep.GetOriginalType(TypeReference type, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    30.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    31.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    32.    at Mono.Linker.Steps.MarkStep.MarkFields(TypeDefinition type, Boolean includeStatic, DependencyInfo& reason, Boolean markBackingFieldsOnlyIfPropertyMarked)
    33.    at Mono.Linker.Steps.MarkStep.MarkImplicitlyUsedFields(TypeDefinition type)
    34.    at Mono.Linker.Steps.MarkStep.MarkRequirementsForInstantiatedTypes(TypeDefinition type)
    35.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    36.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    37.    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference, DependencyInfo reason)
    38.    at Unity.Linker.Steps.UnityMarkStep.Unity.Linker.Steps.Marking.IMarkStepCallbacks.MarkField(FieldReference reference, DependencyInfo& reason)
    39.    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.MarkNeededFields(TypeDefinition type)
    40.    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.DoAdditionalTypeProcessing(TypeDefinition type)
    41.    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    42.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    43.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    44.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    45.    at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet`1 typesAlreadyVisited)
    46.    at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet`1 typesAlreadyVisited)
    47.    at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
    48.    at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
    49.    at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
    50.    at Mono.Linker.Steps.MarkStep.Initialize()
    51.    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    52.    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    53.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    54.    at Mono.Linker.Pipeline.Process(LinkContext context)
    55.    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
    56.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
    57.    at Unity.Linker.UnityDriver.RunDriver()
    58. stderr:
    59.  
    60. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <756e9f00f78640ec93f83e08257daaec>:0)
    61. UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <756e9f00f78640ec93f83e08257daaec>:0)
    62. UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <756e9f00f78640ec93f83e08257daaec>:0)
    63. UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <756e9f00f78640ec93f83e08257daaec>:0)
    64. UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <756e9f00f78640ec93f83e08257daaec>:0)
    65. UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <756e9f00f78640ec93f83e08257daaec>:0)
    66. UnityEditorInternal.IL2CPPBuilder.Run () (at <756e9f00f78640ec93f83e08257daaec>:0)
    67. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <756e9f00f78640ec93f83e08257daaec>:0)
    68. UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
    69. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:913)
    70. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <756e9f00f78640ec93f83e08257daaec>:0)
    71. 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 <756e9f00f78640ec93f83e08257daaec>:0)
    72. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    73. Unity.Industrial.Forma.Editor.Build.BuildHelper:BuildOnTarget(SupportedBuildTarget, BuildProfile, String[], Boolean, Boolean, Boolean, List`1, Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/BuildHelper/BuildHelper.cs:1222)
    74. Unity.Industrial.Forma.Editor.Build.BuildHelper:DoBuild(BuildProfile, Boolean, Boolean, List`1, Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/BuildHelper/BuildHelper.cs:484)
    75. Unity.Industrial.Forma.Editor.Build.BuildHelper:BuildPlatform(BuildProfile, Boolean, Boolean, List`1, Boolean, Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/BuildHelper/BuildHelper.cs:390)
    76. Unity.Industrial.Forma.Editor.UI.Components.BuildTargetBase:Build(Boolean) (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/UI/Configurator/Components/ExportProfileDetails/BuildTargetBase.cs:368)
    77. Unity.Industrial.Forma.Editor.UI.Components.<>c__DisplayClass13_0:<GetBuildAction>b__0() (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/UI/Configurator/Components/ExportProfileDetails/BuildTargetBase.cs:144)
    78. Unity.Industrial.Forma.Editor.UI.ActionSelectorButton:ClickableAction() (at Library/PackageCache/com.unity.industrial.forma@3.0.4/Editor/UI/Common/ActionSelectorButton.cs:128)
    79. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    Can anyone help? Thanks!
     
  2. Enrickl

    Enrickl

    Unity Technologies

    Joined:
    Mar 11, 2020
    Posts:
    8
    Hi Avigar,

    Could you try deleting your "Assets/AddressableAssetData" and "Library/com.unity.addressables/aa" folder and rebuild to see if that solves your problem? If that doesn't work, try upgrading the version of the addressable package.
     
    Avigar likes this.
  3. Avigar

    Avigar

    Joined:
    Jan 26, 2019
    Posts:
    2
    Thank you so much!

    Deleting the folders didn't work but uprading the version of the addressable package did.
    In case anyone else faces the same problem here's what happened after upgrading the package: I got an error relative to the "Library/com.unity.addressables/WebGL" folder and the package manager UI broke. I closed the project and deleted the "Assets/AddressableAssetData", "Library/com.unity.addressables/aa" and "Library/com.unity.addressables/WebGL" folders. After this I opened up the project, tried to make a WebGL build and everything worked perfectly.
     
    Enrickl likes this.