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
- Native Plugins are not found when they are depending on each other
- Errors are thrown after redoing Nested Prefab Variant creation
- Documentation Link does not work when the "VFX Condition" question mark button is clicked
- Documentation Link does not work when the "Spawn State" question mark button is clicked
- Darker lighting in Build when disabling SSAO at runtime
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.