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

Addressables included in build not working after upgrading package

Discussion in 'Addressables' started by AlfredoJimenezDev, Feb 5, 2021.

  1. AlfredoJimenezDev

    AlfredoJimenezDev

    Joined:
    Jul 15, 2020
    Posts:
    7
    Hi everyone,

    I'm currently working on a project where there are a lot of addressables included in the build. Everything was working fine until I upgraded the Addressables package to the latest version (1.16.16).

    This is the error I'm getting:
    Exception encountered in operation Resource<IAssetBundleResource>(StandaloneWindows64\config1_assets_addressablesscenarioindex.asset.bundle), status=Failed, result= : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Windows/StandaloneWindows64\config1_assets_addressablesscenarioindex.asset.bundle'


    What I noticed is that the path contains a folder that exists in the project, but not in the build:
    Library/com.unity.addressables/aa/Windows/StandaloneWindows64\config1_assets_addressablesscenarioindex.asset.bundle

    I opened and old catalog of a build that was working correctly and I couldn't find any single reference to "Library". This is the catalog comparison for the same addressable in the old and the new build:


    Old build (was working)
    "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/StandaloneWindows64/audio5_assets_en-gb/phone/cardio-doesntsoundscardiac_01.wav.bundle"

    New build (not working)
    "Library/com.unity.addressables/aa/Windows/StandaloneWindows64\\audio5_assets_en-gb/phone/cardio-doesntsoundscardiac_01.wav.bundle"


    This is the profile that I've always used, nothing has changed. Why the catalog has replaced the variable {UnityEngine.AddressableAssets.Addressables.RuntimePath} with the Library path?

    upload_2021-2-5_10-17-24.png


    Thanks in advance!
    Cheers
     
    einWikinger likes this.
  2. i_cassell

    i_cassell

    Joined:
    Apr 6, 2019
    Posts:
    21
    Same Problem .But 1.16.15 is OK.Because Unity give developer a bunch of S***!!!!
     
  3. AccessGame

    AccessGame

    Joined:
    Oct 26, 2020
    Posts:
    2
    I have this bug too.
     
  4. AlfredoJimenezDev

    AlfredoJimenezDev

    Joined:
    Jul 15, 2020
    Posts:
    7
    Thanks a lot!!! 1.16.15 seems to fix the problem for me.
     
  5. AdamLacko

    AdamLacko

    Joined:
    Oct 10, 2017
    Posts:
    41
    I'm also experiencing this bug. I mean, I love Unity, but since the New Year, such bugs seem to appear much more often than ever. Please do test your releases Unity! Some of us can't wait weeks for fixes
     
  6. arnaldoGaroto

    arnaldoGaroto

    Joined:
    Feb 3, 2013
    Posts:
    22
    Thanks, 1.16.15 fixed it for me.

    The error I was getting:
    After I upgraded Unity to a more recent LTS (2019.4.18f1) the started crashing with "InvalidCastException: Specified cast is not valid." when the preprocess script tried to build addressables. Then I tried upgrading addressables to 1.16.16 and that solved the build issue, but the resulting apps crashed at start due to missing localization bundle:

    Exception encountered in operation Resource<IAssetBundleResource>(localization-locales_assets_all.bundle), status=Failed, result= : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Android/Android/localization-locales_assets_all.bundle'.

    Annoyingly, it worked fine in the Editor, using play mode script “Use exsisting build (requires built groups)” but crashed the build
     
    Last edited: Feb 11, 2021
  7. nofilenamed

    nofilenamed

    Joined:
    Feb 19, 2018
    Posts:
    1
    The error happens in BuildScriptPackedMode.cs

    Code (CSharp):
    1. internal void AddPostCatalogUpdatesInternal(....)
    2. {
    3. ...
    4.                     if (dataEntry != null)
    5.                     {
    6.                         dataEntry.InternalId = bundleNameWithoutHash;
    7.                     }
    8. ...
    9. }

    Quick fix
    Code (CSharp):
    1. dataEntry.InternalId = StripHashFromBundleLocation(dataEntry.InternalId);
     
    Last edited: Apr 20, 2021
  8. Kobald-Klaus

    Kobald-Klaus

    Joined:
    Jun 20, 2014
    Posts:
    126
    same here with unity 2021.2.18.
    the default local group is not loading anymore after updating and replacing on server.

    but I just found that for this group "can change after release" was selected, which makes no sense, since it is included in the build.
    So I will change that now and test.
     
  9. Kobald-Klaus

    Kobald-Klaus

    Joined:
    Jun 20, 2014
    Posts:
    126
    yes .... it has to be "Cannot change post release" for local files that are included in the build. Which seems obvious to me. I wonder why this option is there at the first place???