WebGL build "linking build.js (wasm)" takes forever

Hey guys,

the build is always working… But at “linking build.js (wasm)” I always have to wait 5 minutes.
Why is that? It worked without problems all the time till yesterday.

I rebooted already of course.

This says the editor log:

[BUSY 6s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 16s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 26s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 36s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 46s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 56s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 66s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 76s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 86s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 96s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 106s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 116s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 126s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 136s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 146s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 156s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 166s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 176s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 186s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 196s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 206s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 216s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 226s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 236s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 246s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 256s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 266s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 276s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 286s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 296s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 306s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 316s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 326s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[BUSY 336s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)
[442/447 342s] Link_WebGL_wasm Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js (+wasm)

1 Like

Did you ever solve this? My build was taking 2 min, but now it’s taking over 20 each time. It always gets stuck at linking build.js (wasm), and I get the same Busy Bee logs just like yours.

I have the same problem, have anybody solved this?

Having the same problem :frowning: Takes forever to build for WebGL because of that step!

In case it’s helpful to narrow down the issue…I tried deleting my Library Folder from my project, which is where all the Bee artifact folders are, but it just rebuilt them and had the same problem. I have also found that the long wait only happens if I make changes to a script since the previous build, even if only changing one line of code. If you guys have any bit of insight, please share.

Same problem here! Kills my workflow when I have to build different versions out and wait for each one!
Unity, please fix!

Hi, I have the same problem on Unity 2022.2.0b16.
It’s fine on 2021LTS, 2022.1.23f1.

Please fix Unity

Looks like this is still not fixed in the latest 2022.2.0f1 release :frowning: My last WebGL build took more then 26 minutes.

Any update on this issue?

8647095--1163199--upload_2022-12-9_1-52-39.png

Hello people! Has anyone solved this problem?

In the latest version of 2021, I collected it in 100 - 150 seconds …

I think I found the issue, i think the issue is that Unity 2022.2.0f1 is shipped with a newer version of Emscripten. When I replace it with the version that is inside Unity 2022.1.23f1 it builds for me within a few minutes. Emscripten can be found here:

2022.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten

Most likely it is only the wasm-ld.exe that is faulty. But I just replaced the complete Emscripten folder to be sure confirm.

I think only replacing the llvm folder inside the Emscripten folder is enough. But I could be wrong.

The faulty version is: 14.0.1.0
The working version is: 13.0.0.0

Can anyone reproduce this same behavior?

9 Likes

I confirmed that replacing Emscripten folder from 2022.1.22f1 also fixed this issue

1 Like

I can confirm that just swapping out wasm-ld.exe is enough to fix this issue. Scratch that, I get a build error. I’m trying out swapping out the whole folder.

EDIT: Replacing the whole folder worked. Nice find!

1 Like

Did any of you file a bug report? Nothing is being fixed without one FYI.

Workarounds are great, but Unity forums are not the best medium to get things fixed.

Created a bug report Wednesday. Didn’t hear anything back yet. :frowning: Will post update here when I hear something.

I had replace folder emascripten, but when i change one line code and rebuild, it take > 5 minutes :frowning: how i can fix it, my unity version is 2022.2.0f1

Same issue in unity version is 2022.2.1f1

Bạn đang dùng version nào của bản 2022 vậy

I’m using Unity 2022.2.0f1

1 Like

Chỉ cần thay folder emascripten của 2022.1.23 cho cái version đang dùng là đc đúng k bạn