Search Unity

[SOLVED] Failed to decompress data for an AssetBundle in StreamingAssets

Discussion in 'Web' started by savely00, Jun 21, 2018.

  1. savely00

    savely00

    Joined:
    Feb 27, 2014
    Posts:
    36
    We are building the asset bundles for our WebGL application using extension .assetbundle .
    We are running our app on IIS server.
    We define MIME type .assetbundle as "application/octet-stream".

    Everything worked when I kept all asset bundles outside the project.
    Now I want to put a default asset bundle in StreamingAssets folder to make sure it is always available and asset will be displayed if external asset bundle load fails.

    I am getting error "Error while downloading Asset Bundle: Failed to decompress data for the AssetBundle 'http://localhost/[application_path]/StreamingAssets/def_model.assetbundle'."

    I tried to build the asset bundle with LZ4 and "No Compression" but result is the same.

    So, the same bundle read fine from the outside of the build but fails to decompress data when inside the build (in StreamingAssets folder).

    What am I missing?
     
    Last edited: Jun 21, 2018
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    does it work locally, with Build&Run ?
     
  3. savely00

    savely00

    Joined:
    Feb 27, 2014
    Posts:
    36
    No errors on local Build&Run.

    Note: No 404 error before the message which means that file is found.
     
  4. savely00

    savely00

    Joined:
    Feb 27, 2014
    Posts:
    36
    I solved it. It was my error not to publish StreamingAssets folder next to the Build folder on a server.
    Everything works!
     
    Marco-Trivellato likes this.