Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.2.2f1
2021.2.6f1
2022.1
2022.2
Issue ID
1401455
Regression
Yes
A jspre syntax error is thrown when running build on WebGL
Reproduction steps:
1. Open the user's attached project
2. Build the WebGL player
3. Configure the Apache server and update httpd.conf file according to this documentation: https://docs.unity3d.com/Manual/webgl-server-configuration-code-samples.html
4. Start Apache server
5. Copy the WebGL player build folder to a location depending on your system:
Mac: Library/WebServer/Documents
Windows: htdocs on XAMPP
6. Open the browser and go to the location http://localhost/[build folder name]
Expected result: Build is successfully loaded and no errors are thrown
Actual result: There is an error message about parsing files and the developer console shows a syntax error
Reproducible with: 2021.2.2f1, 2021.2.14f1, 2022.1.0b10, 2022.2.0a7
Not reproducible with: 2020.3.30f1, 2021.2.1f1
Could not test with: 2019.4.36f1 (Error while building: "Failed process stderr log: JS optimizer error")
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unity Cloud icon does not appear next to project and does not connect correctly when the project is created with Cloud but closed right after creation
- ScrollerSlider in the Scroller Control is still using UXMLTraits
- Crash on ExtractHandles when shutting down the Editor in a specific scene while Burst jobs are in progress
- Unity Hub closes with no "Project is currently open" window when selecting an already open project from the Projects list
- The Hub freezes indefinitely when copy/pasting a lot of characters in the “Set project display name” Hub window since it has no character limit
Resolution Note (2022.2.X):
Emscripten compiler toolchain doesn't handle minified jspre files. If you need to webpack JS to make the jspre, don't optimize in the webpack step, instead a non-development Unity build will minify the generated framework.js as a whole.