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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.