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
- Spot Light with 'Box' Shape stops working when it collides with Mesh
- Accepting Asset Store EULA endless loop in Package Manager window
- “InvalidOperationException: Sequence contains no matching element“ error when reenabling a custom Debug Draw Mode
- Prefab that contains a layout group is marked as changed by the Editor when opened
- Emission animation does not appear when the "Emission Map" parameter is set to black in a Lit material
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.