in WebGL builds we get emscipten permission denied errors, please fix it
Hi @OsirisNetwork ,
Could you please submit a bug report for this issue, ideally with a reproducible attached?
I have submitted a bug report (Case 1345412) - will update once it has been confirmed.
@LeonhardP , I’ve not had any response since submitting the bug report. How long does it normally take?
When building for WebGL I get the following errors:
Building C:\Program Files\Unity\2021.2.0b1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten-wrapper-2.0.19.bat failed with output:
Error opening for writing the file: C:\Program Files\Unity\2021.2.0b1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten-wrapper-2.0.19.bat, error: Permission denied
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Building C:\Program Files\Unity\2021.2.0b1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\.emscripten failed with output:
Error opening for writing the file: C:\Program Files\Unity\2021.2.0b1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\.emscripten, error: Permission denied
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I took a look at the path C:\Program Files\Unity\2021.2.0b1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten and there is no file emscripten-wrapper-2.0.19.bat in there, which I guess is the problem. I hadn’t had this problem with 2021.2.0a19, so I guess this problem came with the new beta. Does anyone else experience this problem? Couldn’t find anything in the forum so far.
Edit: I also tried reinstalling the version and treid building an empty and a small project. For both I got the same error.
This sounds like the same issue here:
I reported a bug but no responses yet. In the meantime a workaround is to give Modify permissions on that BuildTools directory and WebGL should then build successfully.
Thanks a lot, the quickfix does work for me! For everyone wanting to use it as well:
Change the properties of the folder C:\Program Files\Unity\2021.2.0b1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten and allow your user to modify the folder as seen in the screenshot:
Thanks for the bug report @alexmartinio . We will look into it. Processing can take a couple of weeks.
Same here, I have to start Unity Hub as administrator in order for it to build on webgl
There’s a workaround here:
https://forum.unity.com/threads/emscripten-wrapper-2-0-19-bat-missing-2021-2-0b1-windows.1132828/
I have had a response but have been asked to try it in 2021.1.0a1.
@LeonhardP - any idea if this version available anywhere?
The initial suspicion was that the issue could be the same as https://issuetracker.unity3d.com/product/unity/issues/guid/1336902 but that turned out to be wrong. No need for you to try to reproduce it on an older build. I hear that we have a new lead on this so you should hear back from QA soon.
Thanks Leonhard, just seen the message from QA.
Here be the link: Unity Issue Tracker - [WebGL] Build fails with .emscripten permission errors