Search Issue Tracker
Fixed in 2021.1.X
Votes
0
Found in
2020.2
2020.2.0b2
2021.1
Issue ID
1283652
Regression
No
UnityWebRequest on relative URLs throws an error when Exceptions are set to none
How to reproduce:
1. Open attached project (link in the edit)
2. Go to Project Settings->Player->WebGL->Publishing Settings
3. Make sure Enable Exception are set to None
4. Go to Build Settings and make sure that Development Build is enabled
5. Build the project
6. Launch index.html and observe the developer console in the web browser
Expected results: No errors observed
Actual results: Exception error (attached "Exception.txt") after GetRequest WaitForSeconds and fail to get/load WebRequest
Reproducible with: 2020.2.0b8, 2021.1.0a2
Couldn't test: 2018.4.28f1, 2019.4.12f1, 2020.1.9f1 was not able to downgrade project
Note 1: To launch index.html without CORS policy errors, use Firefox, and follow these steps:
a. Type about:config in the navigation bar
b. Search for the security.fileuri.strict_origin_policy parameter
c. Click that parameter to change it to false
d. Restart Firefox
Note 2: No errors are observed when Enable Exceptions are set to Full With Stacktrace
Note 3: Error only occurs in build, but not in Editor
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
- HDRP 6-way VFX Shader is lit incorrectly when World coordinates are used
- 2D Sprite Renderer in front is affected by Sprites in the background when using Sorting Layers and a Shadow Caster 2D with Self Shadow
- Modifying UI Prefab child's Height only confirms the first 1 or 2 digits when the Scene is newly opened or the Prefab is newly created
- ProfilingSampler.Get() returns null and makes the Player only render black when building a Release Build
- Search text field visual controls for the Path binding in an Input Actions Asset is misaligned
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0a8
Until the fix is released, note the following work around:
If you use an root-relative URL, starting with a slash, e.g. "/KioskRessources/K1_KioskData_EnCA.json"
Or use a page-relative URL, but start with the explicit "./", e.g. "./KioskRessources/K1_KioskData_EnCA.json"
Then the UnityWebRequest should work correctly even when Exceptions are set to None.