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
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
- Crash on BurstCompilerService::CompileAsync when entering Play mode in a specific scene
- InvalidOperationException when using Game Camera Preview in Scene window with a custom RenderGraph pass
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.