I’m relatively new to Unity development, so any insight would be much appreciated. Using Unity 2021.2.7f1.
I always get this error when making WebGL development builds.
However, non-development builds work and play just fine.
From what I can tell, it fails to find _ZN6il2cpp2os6Thread16HasCurrentThreadEv, but I’m not sure what would even be defining that symbol in the first place.
Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
error: undefined symbol: _ZN6il2cpp2os6Thread16HasCurrentThreadEv (referenced by top-level compiled C/C++ code)
warning: Link with -s LLD_REPORT_UNDEFINED to get more information on undefined symbols
warning: To disable errors for undefined symbols use -s ERROR_ON_UNDEFINED_SYMBOLS=0
warning: __ZN6il2cpp2os6Thread16HasCurrentThreadEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
I’ve faced with the same issue today. Empty project is compiling, but not empty fails with the same error as above. Could someone help how to fix it?
Upd: It turns out that Development build fails but production build is OK.
Still no luck in determining the cause or a workaround.
I’ve uninstalled unnecessary packages that a previous developer added when they were setting up the project. I’ve also installed additional development packages for Visual Studio 2022. I still get the exact same error.
Hi. There is a bug in Unity 21.2 (fixed in 22.2), where WebGL will not correctly ignore the value of the “Script Debugging” player build setting. “Script Debugging” is not supported on WebGL (hence it is not shown in WebGL build settings) and should be ignored. But in 21.2, Unity will not ignore the setting, and then get a build error.
To work around this, click on a different platform in the Build Player window, uncheck the “Script Debugging” checkbox, and click on WebGL again. Now, you should be fine.
Yeah, I have tried switching that option and it didn’t seem to do anything. I hoped that could work, cause I also have pretty similar error, I’m not specialist or something so I don’t know may just be looking similar. I have quite different problem since I cannot even build the non-development build, same for the dev build
I’m an artist not a programmer, so talk to the duck like a smart child here if you don’t mind. I’m having the same issue. Even with fresh installs of Unity in a blank project on multiple versions. I’m going to test it on a different computer because I wonder if it’s something on this PC somehow. I updated Java, and Visual Studio. I tried checking the Script Debugging setting and it’s already off. I tried deleting the Library/Bee folder, which did nothing, then the whole Library folder (learned not to do that with Unity open.) That caused some hiccups with shader errors. If anyone solved this please let me know. It’s been a year since the last post so I’m hoping it’s something simple.