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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
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.