Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build to WebGL #3

Open
wesraph opened this issue Feb 1, 2021 · 0 comments
Open

Cannot build to WebGL #3

wesraph opened this issue Feb 1, 2021 · 0 comments

Comments

@wesraph
Copy link

wesraph commented Feb 1, 2021

It's not possible to build to WebGL if using WebSocketTransport

Exception: /home/raph/Unity/Hub/Editor/2019.4.16f1/Editor/Data/il2cpp/build/deploy/net471/UnityLinker.exe did not run properly!

Failed running "/home/raph/Unity/Hub/Editor/2019.4.16f1/Editor/Data/il2cpp/build/deploy/net471/UnityLinker.exe" @"/home/raph/Unity/IsWebSocketDead/Temp/StagingArea/Data/Managed/response.rsp" 

stdout:
Fatal error in Unity CIL Linker
Mono.Linker.MarkException: Error processing method: 'MLAPI.Transports.NetEventType WebSocketTransport.WebSocketTransport::PollEvent(System.UInt64&,System.String&,System.ArraySegment`1<System.Byte>&,System.Single&)' in assembly: 'WebSocketTransport.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.UInt64 MLAPI.WebSockets.WebSocketServerEvent::Id
  at Mono.Linker.Steps.MarkStep.HandleUnresolvedField (Mono.Cecil.FieldReference reference) [0x00018] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference) [0x0002d] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00044] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000e9] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00001] in <8770b367edc74e678284d672346206ea>:0 
  at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x001ca] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Unity.Linker.Steps.UnityMarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00041] in <8770b367edc74e678284d672346206ea>:0 
  at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00021] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
   --- End of inner exception stack trace ---
  at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00052] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x00019] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Mono.Linker.Steps.MarkStep.Process () [0x0013c] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000e] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Unity.Linker.Steps.UnityMarkStep.Process (Mono.Linker.LinkContext context) [0x00058] in <8770b367edc74e678284d672346206ea>:0 
  at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000e] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Unity.Linker.UnityPipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x00018] in <8770b367edc74e678284d672346206ea>:0 
  at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00014] in <c0c87e19439140b78d011a4c4a5bddd0>:0 
  at Unity.Linker.UnityDriver.Run () [0x0009b] in <8770b367edc74e678284d672346206ea>:0 
  at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling () [0x00007] in <8770b367edc74e678284d672346206ea>:0 
  at Unity.Linker.UnityDriver.RunDriver () [0x00002] in <8770b367edc74e678284d672346206ea>:0 
stderr:

UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:168)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:159)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:303)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:180)
UnityEditorInternal.IL2CPPBuilder.Run () (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:490)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:235)
UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:387)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:932)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /home/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:29)
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 /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:340)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

Steps to reproduce the behavior:
Create a new 3D Project (Unity 2019.14.16)
Import MLAPI with MLAPI-installer.unity
Install MLAPI v11.11.4 (also tried with v12.1.7)+ WebSocketTransport (latest from the installer)
Create a new NetworkingManager with WebSocket as transport
Build to WebGL

OS: Archlinux (btw)
Unity Version: 2019.4
MLAPI Version: v11.11.4 and v.12.7
MLAPI Commit: [e.g. https://github.com/MidLevel/MLAPI/commit/c102935df1d7e0928283b48948fe96e5d96dd961]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant