Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.0f1
2017.4.19f1
2018.2.19f1
2018.3.5f1
Issue ID
1123815
Regression
No
[Mobile] UnityWebRequest.responseCode always returns 0 instead of 401
To reproduce:
1. Open users attached project "UnityWebRequestIssue.zip"
2. Enter Play mode
3. Observe in the console "Response code: 401"
4. Build for iOS
3. Deploy the Xcode project to an iOS device
4. Observe the Xcode console
Expected result: www.responseCode returns 401
Actual result: www.responseCode returns 0
Reproduced on:
2017.4.0f1 2017.4.19f1 2018.3.5f1
Devices reproduced on:
iPhone 7 Plus iOS 12.0
VLNQA00052, Xiaomi MI MAX (MI MAX), Android 7.0, CPU: Snapdragon 617 MSM8952, GPU: Adreno (TM) 510
Notes:
2019.1.0b3 and 2019.2.0a5 not getting a response code in Xcode console
Doesn't reproduce in the editor on MacOS 10.14 and Win10 machines
On MacOS standalone doesn't reproduce with IL2CPP and MONO
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
- A script cannot be attached to a GameObject when there is another script that is generic with the same name in a different folder
- Scene View drop-down fields reopen when clicking them again to close it
- Crash on UnityEngine.Rendering.RenderPipelineAsset:InternalCreatePipeline when opening a specific project
- [STW 6.1] UI Builder Inspector fields get corrupted when docked UI Builder is maximized
- Pickers and ‘+'/’-' buttons are not visible on the right side of parameter fields when the width of the "Project Settings... -> Quality" window is small
Resolution Note:
I had to wait a bit, but on 2019.1 and later I got the proper 401 response code in console.
UnityWebRequest backend has been rewritten in 2019.1. Since the request fails correctly and the issue is only about the error reporting (and user has the workaround), I see no point in doing anything with this.