Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Fatal error in Unity CIL Linker - The length of the string exceeds the value set on the maxJsonLengt

Discussion in 'Editor & General Support' started by tommohawkaction, May 29, 2020.

  1. tommohawkaction

    tommohawkaction

    Joined:
    May 20, 2017
    Posts:
    27
    Hi,

    I'm not sure what I've done to cause this, but finding it hard to work out what has gone wrong.

    Unity 2019.3.13f1

    Code (CSharp):
    1. Failed running C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe -out="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/tempStrip" -x=C:/Users/tom19/AppData/Local/Temp/tmp589c2c69.tmp -x=C:/Users/tom19/AppData/Local/Temp/tmp1e45d7ea.tmp -x="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/TypesInScenes.xml" -d="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Cinemachine.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.Timeline.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Game.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/HawkNetworking.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.Postprocessing.Runtime.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Utils.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Rewired_Core.dll" --dotnetruntime=mono --dotnetprofile=unityaot --use-editor-options --include-directory="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed" --rule-set=Conservative --editor-data-file="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json" --platform=WindowsDesktop --architecture=x64 --engine-modules-asset-file="C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/Whitelists/../modules.asset"
    2.  
    3. stdout:
    4. Fatal error in Unity CIL Linker
    5. System.ArgumentException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
    6. Parameter name: input
    7.    at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
    8.    at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)
    9.    at Unity.Linker.Steps.InitializeEngineStrippingStep.LoadEditorData(UnityLinkContext context)
    10.    at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
    11.    at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
    12.    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    13.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    14.    at Mono.Linker.Pipeline.Process(LinkContext context)
    15.    at Unity.Linker.UnityDriver.Run()
    16.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
    17.    at Unity.Linker.UnityDriver.RunDriver()
    18. stderr:
    19.  
     
    Last edited: May 29, 2020
  2. tommohawkaction

    tommohawkaction

    Joined:
    May 20, 2017
    Posts:
    27
    Ok been trying at this for hours now, 1 thing I found out is turning off Mono stripping fixes it, and putting it back on causes the error. So at this stage I'm stumped... Any advice? I'm also using IL2CPP which you can't turn off stripping
     
  3. tommohawkaction

    tommohawkaction

    Joined:
    May 20, 2017
    Posts:
    27
    More on the error

    Code (CSharp):
    1. Invoking UnityLinker with arguments: -out="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/tempStrip" -x=C:/Users/tom19/AppData/Local/Temp/tmp6c372cc.tmp -x=C:/Users/tom19/AppData/Local/Temp/tmp67e7bdd.tmp -x="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/TypesInScenes.xml" -d="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Cinemachine.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.Timeline.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Game.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/HawkNetworking.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.Postprocessing.Runtime.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Utils.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Rewired_Core.dll" --dotnetruntime=mono --dotnetprofile=unityaot --use-editor-options --include-directory="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed" --rule-set=Conservative --editor-data-file="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json" --platform=WindowsDesktop --architecture=x64 --engine-modules-asset-file="C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/Whitelists/../modules.asset"
    2. C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe exited after 759 ms.
    3. Failed running C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe -out="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/tempStrip" -x=C:/Users/tom19/AppData/Local/Temp/tmp6c372cc.tmp -x=C:/Users/tom19/AppData/Local/Temp/tmp67e7bdd.tmp -x="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/TypesInScenes.xml" -d="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Cinemachine.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.Timeline.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Game.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/HawkNetworking.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.Postprocessing.Runtime.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Utils.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll" --include-unity-root-assembly="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/Rewired_Core.dll" --dotnetruntime=mono --dotnetprofile=unityaot --use-editor-options --include-directory="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed" --rule-set=Conservative --editor-data-file="H:/Development/Wobbly Life/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json" --platform=WindowsDesktop --architecture=x64 --engine-modules-asset-file="C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/Whitelists/../modules.asset"
    4.  
    5. stdout:
    6. Fatal error in Unity CIL Linker
    7. System.ArgumentException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
    8. Parameter name: input
    9.    at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
    10.    at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)
    11.    at Unity.Linker.Steps.InitializeEngineStrippingStep.LoadEditorData(UnityLinkContext context)
    12.    at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
    13.    at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
    14.    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    15.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    16.    at Mono.Linker.Pipeline.Process(LinkContext context)
    17.    at Unity.Linker.UnityDriver.Run()
    18.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
    19.    at Unity.Linker.UnityDriver.RunDriver()
    20. stderr:
    21.  
    22. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    23. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    24. UnityEngine.Logger:Log(LogType, Object)
    25. UnityEngine.Debug:LogError(Object)
    26. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
    27. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1)
    28. UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
    29. UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String&, String&, IEnumerable`1, UnityLinkerRunInformation)
    30. UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(UnityLinkerRunInformation)
    31. UnityEditorInternal.AssemblyStripper:StripAssemblies(String, BaseUnityLinkerPlatformProvider, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel)
    32. UnityEditorInternal.AssemblyStripper:StripForMonoBackend(BuildTarget, RuntimeClassRegistry, ManagedStrippingLevel, BuildReport)
    33. DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1)
    34. DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs)
    35. UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess(BuildPostProcessArgs, BuildProperties&)
    36. UnityEditor.PostprocessBuildPlayer:Postprocess(BuildTargetGroup, BuildTarget, String, String, String, Int32, Int32, BuildOptions, RuntimeClassRegistry, BuildReport)
    37. UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
    38. UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
    39. UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
    40. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    41. UnityEditor.BuildPipeline:BuildPlayer(EditorBuildSettingsScene[], String, BuildTarget, BuildOptions)
    42. EditorBuildTool:Build(EditorBuildSettingsScene[], BuildTarget, BuildOptions, String) (at Assets\Editor\BuildTools\EditorBuildTool.cs:302)
    43. EditorBuildTool:BuildPipeLine(BuildTarget, BuildOptions, String, String[], String[]) (at Assets\Editor\BuildTools\EditorBuildTool.cs:270)
    44. EditorBuildTool:BuildDevelopmentTestx64Mono() (at Assets\Editor\BuildTools\EditorBuildTool.cs:59)
    45. (Filename: Assets/Editor/BuildTools/EditorBuildTool.cs Line: 302)
    46.  
    47. Exception: C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe did not run properly!
    48.   at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0012b] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    49.   at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00060] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    50.   at UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) [0x00038] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    51.   at UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) [0x003a7] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    52.   at UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) [0x00149] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    53.   at UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) [0x00013] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    54.   at UnityEditorInternal.AssemblyStripper.StripForMonoBackend (UnityEditor.BuildTarget buildTarget, UnityEditor.RuntimeClassRegistry usedClasses, UnityEditor.ManagedStrippingLevel managedStrippingLevel, UnityEditor.Build.Reporting.BuildReport report) [0x0005c] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    55.   at DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) [0x0018c] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    56.   at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00015] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    57. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    58.   at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00070] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    59.   at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00001] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    60.   at 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) [0x000dc] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    61. UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
    62. UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
    63. UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
    64. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    65. UnityEditor.BuildPipeline:BuildPlayer(EditorBuildSettingsScene[], String, BuildTarget, BuildOptions)
    66. EditorBuildTool:Build(EditorBuildSettingsScene[], BuildTarget, BuildOptions, String) (at Assets\Editor\BuildTools\EditorBuildTool.cs:302)
    67. EditorBuildTool:BuildPipeLine(BuildTarget, BuildOptions, String, String[], String[]) (at Assets\Editor\BuildTools\EditorBuildTool.cs:270)
    68. EditorBuildTool:BuildDevelopmentTestx64Mono() (at Assets\Editor\BuildTools\EditorBuildTool.cs:59)
     
  4. tommohawkaction

    tommohawkaction

    Joined:
    May 20, 2017
    Posts:
    27
    Still stuck on this, cannot work this out at all
     
  5. tommohawkaction

    tommohawkaction

    Joined:
    May 20, 2017
    Posts:
    27