Search Issue Tracker

Fixed in 2017.3.0f3

Votes

2

Found in

2017.3.0b5

Issue ID

960676

Regression

Yes

[Networking] UnityWebRequest.Post returns "Generic/unknown HTTP error"

Networking

-

Steps to reproduce:
1. Open attached project
2. Play the scene
3. Notice the WebRequest Error: Generic/unknown HTTP error

Expected result: console should print: Return data: post field is set instead

Reproduced in: 2018.1.0a1, 2017.3.0b5, 2017.3.0b1
Not reproduced in: 2017.3.0a7, 2017.2.0f3
Regression since: 2017.3.0b1

Comments (34)

  1. Akashraj12

    May 12, 2020 05:25

    HI,

    [NETWORKING] "GENERIC/UNKNOWN HTTP ERROR"
    This problem is very common. If you have worked with Rest API then things are pretty easy to understand.
    For More Details You Can Check : https://www.sevenmentor.com/

  2. kinodax

    Jun 03, 2019 05:23

    I wonder how much of this is due to "Cleartext HTTP traffic to [MY_IP] not permitted" issue under the hood. Spent hours on code that probably worked in the first hour .... see https://forum.unity.com/threads/android-9-cleartext-http-traffic-to-my_ip-not-permitted.594298/

  3. Playrion

    May 23, 2019 13:23

    I have the same problem, iOS only, on a POST, after moving to Unity 2019.1. No solution worked for now...

  4. BeatMicrosoft

    May 01, 2019 10:41

    i get this in unity 2018.2.0f2 it happend in some android devices

  5. unity_iVykv3zUmsGUXw

    Apr 22, 2019 18:23

    The trick is to use a DownloadHandler. DownloadHandlers manage and process HTTP response body data received from a remote server hence the actual error message is in DownloadHandlerBuffer. In order to get the error message from the server instead of just "GENERIC/UNKNOWN HTTP ERROR" catch the error and get the downloadhandler text.

    if (this.request.isNetworkError || this.request.isHttpError)
    {
    throw new Exception(this.request?.downloadHandler?.text ?? this.request.error);
    }

  6. Meltdown

    Apr 11, 2019 09:20

    I get this in 2018.3.12f1. Why has this been marked as fixed?

  7. adaptivemobiledevelopment

    Mar 26, 2019 00:39

    I am still having this error in unity 2018.3.9f1 on Android. Works fine in the editor and on iOS. I have tired turning of httpcontinue and chucked coding without success. I have tired starting with a PUT then change it to a POST. Still does not work. Verified fiddler is returning 200. Error status is http/generic Code is 0. Download.text is blank.

  8. Keyserjaya99

    Mar 25, 2019 06:19

    I've fixed it by set "www.chunkedTransfer = true;"

  9. goldbug

    Dec 05, 2018 22:21

    I had the same problem in my linux builds with unit 2018.2.18

    The solution was to install curl in my linux boxes.

  10. VARtechLLC

    Nov 19, 2018 18:13

    I'm still having this issue in 2018.2. I tried the www.chunkedTransfer = false and still receive the error.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.