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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Failed to decompress data for the AssetBundle 'Memory'

Discussion in 'WebGL' started by unity01_csu, Apr 27, 2018.

  1. unity01_csu

    unity01_csu

    Joined:
    Nov 13, 2015
    Posts:
    4
    Hello.

    We got error ”Failed to decompress data for the AssetBundle 'Memory'” when AssetBundle.LoadFromMemory.
    How can we solve this? we have no idea...

    status:
    1. Error causes in WebGL Build with below versions of Unity.
      • 2017.3.0f3
      • 2017.4.1f1
      • 2018.1.0b12
    2. No error in Unity 2017.2.0f3 + WebGL Build.
    3. We are tring to load assetbundle named like "sample/basic/sound/home".
    4. We have no assetbundle named "Memory".
    5. No error in other platforms(confirmed in Windows+UnityEditor and Android Build).
    6. Other assetbundles named like "sample/basic/textures" are loaded with no error.
    Thanks!
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Assuming you rebuilt the asset bundles with the corresponding version of Unity, it might be a regression.
    Could you please submit a bug report with a simple repro project and post the bug number# here ?
     
  3. unity01_csu

    unity01_csu

    Joined:
    Nov 13, 2015
    Posts:
    4
    Hello. Thanks for your reply!

    By our closer inspection, we discovered that problem was caused by specific ogg audio asset.
    We send bug report #1032693. please check here!
    https://fogbugz.unity3d.com/default.asp?1032693_1f69op5d5kdsnmhc

    Thanks!
     
  4. Salocin808

    Salocin808

    Joined:
    Mar 29, 2018
    Posts:
    13
    Having the same error in my webgl application. I am loading the bundle like this:

    Code (CSharp):
    1. byte[] decodedBytes;
    2.             AssetBundle bundle = null;
    3.             try
    4.             {
    5.                 decodedBytes = Convert.FromBase64String(dataValRaw);
    6.                 bundle = AssetBundle.LoadFromMemory(decodedBytes);
    7.             }
    I'm guessing the error comes from the LoadFromMemory function. Any ideas?
     
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    The problem mentioned earlier seems to be a regression introduced in 2017.3.

    does your code works in 2017.2 or earlier?
     
  6. Salocin808

    Salocin808

    Joined:
    Mar 29, 2018
    Posts:
    13
    The problem was that I didn't specify the options
     BuildAssetBundleOptions, targetPlatform
    correctly when building the bundle (uncomopressed and webgl as target).
     
  7. abibarte

    abibarte

    Joined:
    Feb 22, 2019
    Posts:
    3
    Please do you have some example, i have the same problem, try to convert a byte to assetbundled and then convert into a Gameobject , but when i convert the byte to assetbundle geting a null...

    byte[] model = Convert.FromBase64String(sBase64);
    AssetBundle bundle = AssetBundle.LoadFromMemory(model);

    in the thebuger the variable "bundle" is equals a "null"..

    So you have some exmaple o where can i found a examples or any idea T_T please...
     
  8. MHatfull

    MHatfull

    Joined:
    Aug 23, 2017
    Posts:
    8
    We get this issue every month or so on some, seemingly random, bundle in our project (a different one every time). The only fix I have found is to change the bundle enough that it works again, possibly by changing a texture to be a slightly different colour or some other action. This is a really time consuming bug. We've had it on most versions since 2017.
     
    mowax74 and amateurd like this.