Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug UnityWebrequest downloadhandler is empty for some request responses in Unity 2022.1.23

Discussion in 'WebGL' started by manuelgoellnitz, Nov 21, 2022.

  1. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    365
    After upgradeing to Unity 2022.1.23 I discovered a strange bug:

    Our app gets data via a REST api from our backend but for some requests the downloadhandler.text is now empty, data and nativeData also.
    But the server send a correct response, since I can see the returned data in the browser DevTools network tab.
    It also happens for the same call where just the requested Object Id differs.
    I mean GetCar?id=1 works, GetCar=id=2 does not (but car 1 and car 2 are returned by the server since I can see the correct response in the browser DevTools).

    The bug only happens in build, in the editor, everything works fine.
     
  2. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    Confirmed. AssetManagement is broken in Unity 2022.1.23. Had to revert back to 2022.1.20 to get WebGL working again. Same issue - works fine in the editor, broken in the build. StreamingAsset bundles that were working just fine previously are now generating errors.

    Best to avoid this build altogether until it has been triaged and fixed.

    upload_2022-11-22_17-59-49.png
     
  3. Dmitry-Pyalov

    Dmitry-Pyalov

    Joined:
    Dec 13, 2011
    Posts:
    125
    From what I've discovered, Unity 2022.1.23 is unable to load asset bundles with ".bundle" file extension in WebGL.
    I truly don't know why. Rename them to ".package" and everything works fine :)
     
  4. Dmitry-Pyalov

    Dmitry-Pyalov

    Joined:
    Dec 13, 2011
    Posts:
    125
  5. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    I try not to grab builds close to the holidays as it *REALLY* burned us last year as we were early in our WebGL journey and the WebGL renderer just stopped working for several releases.
     
  6. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    365
    The Bug seems to be fixed with 2022.1.24!
     
  7. dramatemple

    dramatemple

    Joined:
    Apr 27, 2013
    Posts:
    14
    I am not sure if it is the same issue however I am facing a similar problem.

    I have a game that is built with 2021.1.6f1 which works fine, however, I need to upgrade the Unity version since it has a weird memory bug on Android browsers. I tried both 2022.1.23f and 20213.15f (LTS) but no chance. My UnityWebRequests are working fine on Editor, also in the version built with 2021.1.6f but not on the other versions.

    I keep getting an Unkown Error...