Search Issue Tracker

Active

Votes

22

Found in

2017.1.0a2

Issue ID

886653

Regression

No

Request error (error) in console when Searching by Type in the Project Browser

Scene Hierarchy

-

Steps to reproduce :

- create a new project
- click on Search by Type
- select a few options and notice the error

Request error (error):
UnityEditor.AsyncHTTPClient:Done(State, Int32)

*Note:
Gif included for more info.

Comments (6)

  1. 6ab51aef43163f8d0dedcb10a8c309e4?d=mm

    mikael_kalms

    Mar 28, 2018 07:10

    Digging further: this is caused by internal errors within Unity's backend service at shawarma.unity3d.com.

    Here is a successful HTTP API call (captured using Fiddler) with request & response:

    GET http://shawarma.unity3d.com/public-api/search/assets.json?unityversion=2017.3.1f1&skip_terms=1&q=bootcon&c=&l=&O=&N=&G= HTTP/1.1
    Host: shawarma.unity3d.com
    User-Agent: UnityEditor/2017.3.1f1 (Windows; U; Windows NT 10.0; en)
    Accept: */*
    Accept-Encoding: identity
    Connection: Keep-Alive
    X-Unity-Session: 26c4202eb475d02864b40827dfff11a14657aa41548501f33da35ce3a96c421d36f00c92b1d61c5c4c79942712fe083b1f0d8125c825bc7cac67115a

    HTTP/1.1 200 OK
    Server: Apache/2.2.22 (Debian)
    Cache-Control: max-age=0, no-store
    X-Kharma-CacheInfo: uncacheable
    Vary: Accept-Encoding
    Content-Type: text/plain
    Content-Length: 502
    Accept-Ranges: bytes
    Date: Wed, 28 Mar 2018 07:03:39 GMT
    X-Varnish: 3565388464
    Age: 0
    Via: 1.1 varnish
    Set-Cookie: SERVERID=varnish02; path=/
    Cache-control: private

    {"query":{"limits":[],"offsets":[],"query":"bootcon","groups":[],"class":[],"labels":[]},"status":"ok","groups":[{"matches":[],"time":"0.000","name":"free","total":0,"words":{"bootcon":{"hits":0,"docs":0},"free":{"hits":200186,"docs":173406}},"total_found":0,"error":"","warning":"","label":"Free Assets"},{"matches":[],"time":"0.000","name":"paid","total":0,"words":{"paid":{"hits":4262110,"docs":4262028},"bootcon":{"hits":0,"docs":0}},"total_found":0,"error":"","warning":"","label":"Paid Assets"}]}

    Here is a failed API call -- notice that the request is identical to the successful call:

    GET http://shawarma.unity3d.com/public-api/search/assets.json?unityversion=2017.3.1f1&skip_terms=1&q=bootcon&c=&l=&O=&N=&G= HTTP/1.1
    Host: shawarma.unity3d.com
    User-Agent: UnityEditor/2017.3.1f1 (Windows; U; Windows NT 10.0; en)
    Accept: */*
    Accept-Encoding: identity
    Connection: Keep-Alive
    X-Unity-Session: 26c4202eb475d02864b40827dfff11a14657aa41548501f33da35ce3a96c421d36f00c92b1d61c5c4c79942712fe083b1f0d8125c825bc7cac67115a

    HTTP/1.1 200 OK
    Server: Apache/2.2.22 (Debian)
    Cache-Control: max-age=0, no-store
    X-Kharma-CacheInfo: uncacheable
    Vary: Accept-Encoding
    Content-Type: text/plain
    Content-Length: 208
    Accept-Ranges: bytes
    Date: Wed, 28 Mar 2018 06:56:26 GMT
    X-Varnish: 814532282
    Age: 0
    Via: 1.1 varnish
    Set-Cookie: SERVERID=varnish01; path=/
    Cache-control: private

    {"query":{"limits":[],"offsets":[],"query":"bootcon","groups":[],"class":[],"labels":[]},"status":"error","error":"Failed to open connection to localhost:9312: Connection refused... ConnectRetries exceed..."}

    And that error message? "Failed to open connection to localhost:9312"? That is an error when one service in the backend fails talking to another in the same backend.

    Port 9312 is used by the Sphinx search server (http://sphinxsearch.com/).

    It seems that the frontend APIs are hitting the Sphinx search server more often than it can respond, and the random search server errors are leaking through to the Unity Editor clients.

    Can you please not leak those errors through to the Unity Editor clients?

  2. 6ab51aef43163f8d0dedcb10a8c309e4?d=mm

    mikael_kalms

    Mar 28, 2018 06:51

    This is happening randomly to me as well. It happens even when I do not have any Asset Store window open. Sometimes it happens shortly after I hit "Play" in the inspector. It makes me and others on my team think that the game is broken, when it isn't. It is extra annoying because it is an error outside of our control.

    The error message originates from the Asset Store backend. Starting with this line: https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/Mono/AssetStore/AssetStoreClient.cs#L711
    ... the call to ParseJson() will set the 'status' string to "error". In other words, the Asset Store backend has delivered a well-formed JSON which either contains status = "error", or error = "error".

  3. C35b9264646fd1b72f6ccfca2622c409?d=mm

    AlanMattano

    Aug 04, 2017 02:44

    A better fix is:

    In Windows go to the files of your project as for example the folder ProjectSettings and check inside the security properties files as for example ProjectVersion.txt or any other file out from assets folder. And look if your user has read and WRITE permission. If not , inside the properties in the tab security, "edit" the settings to write or total control.

  4. C35b9264646fd1b72f6ccfca2622c409?d=mm

    AlanMattano

    Aug 04, 2017 02:27

    A fix is:

    Edit -> Preferences -> DISABLE Show Asset Store Search Hits
    Then close Unity and any text editors you're using with unity. And open them up again.

    The error should be gone.

    But I do not know the consequences of disabling Asset Store Search Hits

  5. E8a9678b045ce1e55aa73322e433d172?d=mm

    shochet

    Jul 28, 2017 22:30

    Same problem in Unity 5.4.4f1

  6. 9a322ffd8b46d81fbdf89dd09b7ea98c?d=mm

    robertes

    Jul 27, 2017 16:13

    I get that same error in many other cases, too, not just searching by type. Since I have "Error Pause" selected in my console, it's very disruptive.

    I disabled showing asset store hits when searching to work around it.

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.