Failed WebGL builds with 1.3

Going through and updated to 1.3 I’m getting failed WebGL builds. When I downgrade the same project back to 1.2.4 I get successful builds.

I’ve done full a full reimport as well as made sure the bake is all good.

This is the build error I’m getting:

Build completed with a result of 'Failed' in 337 seconds (337233 ms)
Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:

D:\Projects\***>set MYDIR=C:\Program Files\Unity\Hub\Editor\6000.0.19f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\ 

D:\Projects\***>goto FOUND_MYDIR 
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: DebugSetOnPacketSent
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: DebugSetOnPacketSent
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: DebugSetOnPacketSent
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: DebugSetOnPacketReceived
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: DebugSetOnEntityAcked
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnTimeResetCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnFixedNetworkUpdateCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnLateFixedNetworkUpdateCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnServerSimulationFrameReceivedCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: DebugSetOnPacketReceived
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: DebugSetOnEntityAcked
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnTimeResetCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnFixedNetworkUpdateCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnLateFixedNetworkUpdateCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: SetNetworkTimeOnServerSimulationFrameReceivedCallback
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: GetClientID
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: GetClientID
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: GetConnectionType
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: GetConnectionType
wasm-ld: error: D:/Projects/***/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(wm8hfejyz9en.o): undefined symbol: GetHostName
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
emcc: error: '"C:/Program Files/Unity/Hub/Editor/6000.0.19f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\wasm-ld.exe" @C:\Users\***\AppData\Local\Temp\emscripten_accr1zti.rsp.utf-8' failed (returned 1)

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

The *** is just commenting out my path/usernames. This is all on Unity 6000.0.19f1.

Hey Michael, thanks for reporting.

We are currently investigating this and will update you as soon as we have figured out what has happened.

Hey there,

It sounds like you’re running into an issue where the WebGL build isn’t stripping unused code, which can lead to problems with linking unmanaged functions. We started working on a fix that should ship in the next release.

In the meantime, you could try checking if you’re using any of the code preservation techniques described in the Unity documentation. One common culprit is the use of a link.xml file. The assembly that should be excluded from being preserved is called Coherence.Core.Native.

Apologies for the inconvenience. We’ll keep you updated on our progress!

So I don’t have a link.xml anywhere. And code stripping is set to minimum. Is there a way to work around this at the moment? Or do I just forgo the upgrade at the moment. There are things in 1.3 that we need.

So an update with this, we have it set to Minimal for code stripping, we use a lot of reflection and me messing around link.xml and some other options to try to get things running again on Low is not really working. The project relies on reflection and some other processes that make stripping hard to manage at the moment.
When I do go to Low I can get builds so what is the timeframe of the patch so that Minimal code stripping can build again with the coherence sdk?
Unless you know of a way to force Coherence.Core.Native to be stripped when I things set to Minimal.

We’ve initiated work on the next minor release. Providing an exact timeline is challenging as we’re fresh off the 1.3.0 release. It’s difficult to predict any urgent issues that should be addressed in the upcoming release. If all goes well, we’re aiming for a release in approximately two weeks. However, based on past experience, it could take longer.

In the meantime, a possible workaround involves embedding the 1.3.0 package and then disabling the Coherence.Core.Native assembly on WebGL using an .asmdef asset. Unity offers comprehensive documentation on package embedding. Feel free to reach out if you encounter any issues, and I’ll gladly assist.

Not sure about including the whole coherence package in the short term, so we’ll stick with 1.2.4 for now.

Hey! This has been fixed as of 1.3.1