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

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

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"

stdout:
Fatal error in Unity CIL Linker
System.ArgumentException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
Parameter name: input
   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)
   at Unity.Linker.Steps.InitializeEngineStrippingStep.LoadEditorData(UnityLinkContext context)
   at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
   at Mono.Linker.Steps.BaseStep.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.Run()
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
   at Unity.Linker.UnityDriver.RunDriver()
stderr:

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

More on the error

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"
C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe exited after 759 ms.
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"

stdout:
Fatal error in Unity CIL Linker
System.ArgumentException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
Parameter name: input
   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)
   at Unity.Linker.Steps.InitializeEngineStrippingStep.LoadEditorData(UnityLinkContext context)
   at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
   at Mono.Linker.Steps.BaseStep.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.Run()
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
   at Unity.Linker.UnityDriver.RunDriver()
stderr:

UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String&, String&, IEnumerable`1, UnityLinkerRunInformation)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(UnityLinkerRunInformation)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, BaseUnityLinkerPlatformProvider, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel)
UnityEditorInternal.AssemblyStripper:StripForMonoBackend(BuildTarget, RuntimeClassRegistry, ManagedStrippingLevel, BuildReport)
DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1)
DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs)
UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess(BuildPostProcessArgs, BuildProperties&)
UnityEditor.PostprocessBuildPlayer:Postprocess(BuildTargetGroup, BuildTarget, String, String, String, Int32, Int32, BuildOptions, RuntimeClassRegistry, BuildReport)
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
UnityEditor.BuildPipeline:BuildPlayer(EditorBuildSettingsScene[], String, BuildTarget, BuildOptions)
EditorBuildTool:Build(EditorBuildSettingsScene[], BuildTarget, BuildOptions, String) (at Assets\Editor\BuildTools\EditorBuildTool.cs:302)
EditorBuildTool:BuildPipeLine(BuildTarget, BuildOptions, String, String[], String[]) (at Assets\Editor\BuildTools\EditorBuildTool.cs:270)
EditorBuildTool:BuildDevelopmentTestx64Mono() (at Assets\Editor\BuildTools\EditorBuildTool.cs:59)
(Filename: Assets/Editor/BuildTools/EditorBuildTool.cs Line: 302)

Exception: C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe did not run properly!
  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
  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
  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
  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
  at UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) [0x00149] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
  at UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) [0x00013] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
  at UnityEditorInternal.AssemblyStripper.StripForMonoBackend (UnityEditor.BuildTarget buildTarget, UnityEditor.RuntimeClassRegistry usedClasses, UnityEditor.ManagedStrippingLevel managedStrippingLevel, UnityEditor.Build.Reporting.BuildReport report) [0x0005c] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
  at DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) [0x0018c] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
  at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00015] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
  at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00070] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
  at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00001] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
  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
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
UnityEditor.BuildPipeline:BuildPlayer(EditorBuildSettingsScene[], String, BuildTarget, BuildOptions)
EditorBuildTool:Build(EditorBuildSettingsScene[], BuildTarget, BuildOptions, String) (at Assets\Editor\BuildTools\EditorBuildTool.cs:302)
EditorBuildTool:BuildPipeLine(BuildTarget, BuildOptions, String, String[], String[]) (at Assets\Editor\BuildTools\EditorBuildTool.cs:270)
EditorBuildTool:BuildDevelopmentTestx64Mono() (at Assets\Editor\BuildTools\EditorBuildTool.cs:59)

Still stuck on this, cannot work this out at all

Ok if anyone else is having this issue, I found that they’ve made a fix for it on Unity 2020.2 however there is no fix for Unity 2019.3 as from such