Search Unity

Bug Is the download timeout value broken?

Discussion in 'Addressables' started by LucasHehir, Oct 14, 2020.

Thread Status:
Not open for further replies.
  1. LucasHehir

    LucasHehir

    Joined:
    May 7, 2020
    Posts:
    74
    Unity 2019.4.4f
    Addressables 1.15
    Android API min 29

    I have my bundles remote using AWS and everything so far has been relatively mint. That is until I had a user with very unstable internet show me a situation where their internet dropped out mid-download and every material turned pink (!!).

    So I went about changing the default timeout value for each asset group from 0 to 5, intending to give a timespan of 5 seconds. Well, no, all it did was raise absolute hell next time anyone (stable connection or otherwise) attempted to download a bundle. Specifically, a lot of this:

    E Unity : Curl error 28: Operation timed out after 5000 milliseconds with 7233541 out of 17071917 bytes received
    E Unity : (Filename: ./Modules/UnityWebRequest/Implementations/TransportCurl.cpp Line: 813)

    Followed by a lot of this:

    I Unity : Web request <my-remote-url>.bundle failed with error 'Request timeout', retrying (4/5)

    This was also accompanied by the same everything-turns-pink-including-UI-text bug.

    Note that this was never happening when the value was 0 where downloads seemed to quietly await through the same quality of connection. It's only upon increasing that value that this begun happening for users with a stable connection.

    Any idea on what's happening here? I'd like to be able to use that timeout value if possible...
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
  3. LucasHehir

    LucasHehir

    Joined:
    May 7, 2020
    Posts:
    74
    Absolutely, thanks Trey!
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey @LucasHehir, the default value of 0 just tells the system not to worry about timeouts and take all the time they need. It's very possible that, especially for larger sets of bundles, your downloads are taking longer than 5 seconds and the timeout is working as intended. If you set the timeout for, say, 100 seconds or 1000 seconds or something incredibly long, does it still time out?

    As far as everything turning pink, I imagine what's happening is that the bundle you're attempting to load has textures or materials in a bundle that's failing to download. It might not be the case, but that'd be the first thing I'd check out.
     
  5. LucasHehir

    LucasHehir

    Joined:
    May 7, 2020
    Posts:
    74
    Ah I see. So the timeout counter is for the whole duration of the download, not duration since the last loss in connectivity? It sounds like 0 is what we want in that regard then, it's preferable to just let the download stall until the user re-establishes their connection.

    As for the pink issue, we only ever load in bundles as entire disparate scenes. As in, each bundle is a distinct scene without shared resources. So the materials and UI turning pink/white are already loaded and displaying properly, up until the download fails. It's very strange.
     
  6. AriyaSD

    AriyaSD

    Joined:
    Nov 2, 2019
    Posts:
    24
    I'm pretty sure this is fixed in 1.16.6:
    I had a similar issue on 1.16.1 but it hasn't happened since I updated to 1.16.6.
     
Thread Status:
Not open for further replies.