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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Bug (Case 1370485) Addressables 1.19.6 content build failure (key was not present in the dictionary)

Discussion in 'Addressables' started by Peter77, Oct 4, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,447
    Addressables 1.19.6 outputs a "content build failure" when creating a new AssetGroup and then building content.



    Reproduce
    1. Open attached project
    2. Open "Window > Asset Management > Addressables > Groups"
    3. Click "Build > New Build > Default Build Script"

    Actual
    Unity outputs "The given key was not present in the dictionary." and "Addressable content build failure (duration : 0:00:00)" errors.

    Expected
    No error. Content builds successfully.
     

    Attached Files:

  2. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    172
    I ran into the same issue and was like yup, I'm just gonna stick with an old version again. Disheartening to see that it does that on a very simple basic assetgroup.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,447
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,447
  5. PixelFireXY

    PixelFireXY

    Joined:
    Nov 2, 2011
    Posts:
    53
    I have the same problem after upgrading to 1.19.6
     
  6. unity_krista

    unity_krista

    Unity Technologies

    Joined:
    Apr 28, 2020
    Posts:
    40
    The "Won't fix" status is a little misleading, this actually should be fixed in 1.19.11. It was fixed as part of a different ticket, both related to build/load paths. After updating you have to set the custom build and load paths or it will fail similarly. Let me know if after that you're still seeing this problem in 1.19.11 or later
     
    jperry_oddgames and Peter77 like this.
  7. jperry_oddgames

    jperry_oddgames

    Joined:
    Sep 18, 2017
    Posts:
    62
    hey @unity_krista, I've updated the Addressables package to version 1.19.18 and I'm still seeing this issue when trying to build content.

    I saw you mentioned setting the custom build & load paths. I'm not sure if we're using them correctly, they're set as follows:
    LocalBuildPath: [UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]
    LocalLoadPath: {UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]

    We've successfully been using addressables with these values on version 1.18.19 for a while now. Please let me know if I'm doing something dumb or if these paths need to be changed for the new version, thanks


    Edit: I think we may be experiencing a different issue. As previously stated, we're running 1.18.19 which has worked fine until I created some new addressable groups today. All the groups & schemas seem to match existing settings. Now when I attempt to build, we get the following message logged twice:
    Code (CSharp):
    1. Could not find a part of the path ""
    2. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    followed by the
    Addressable content build failure (duration : 0:00:00)
    error message.
     
    Last edited: Feb 15, 2022
  8. unity_krista

    unity_krista

    Unity Technologies

    Joined:
    Apr 28, 2020
    Posts:
    40
    I meant you may have to re-enter them in the settings after updating, because the options changed a little in the inspector. That is strange. All the paths look right in the top level settings and group settings and profile settings?
     
  9. jperry_oddgames

    jperry_oddgames

    Joined:
    Sep 18, 2017
    Posts:
    62
    @unity_krista
    Apologies, I'm sure now that this is another bug. The problem only arises when I do the following:
    1. Create a new addressables group
    2. Set the group to Pack Separately
    3. Add one particular texture that I've determined was causing the issue
    Some notes:
    • If I set the group to Pack Together instead of separately, the build completes without failure.
    • Reimporting the problematic texture doesn't help, and there's nothing strange about its import settings. Even diffing the meta file to another working texture's meta file shows nothing weird.
    • Removing all other groups in our main project (so the one problematic texture asset is the only addressable asset in the project) does not work either.
    • I'm unable to create a minimum reproduction project - copying the problematic texture + meta, and the entire AddressableAssetsData folder to a new project doesn't reproduce the error; instead it builds as expected.
    I'll continue trying to reproduce this error in another project so I can submit a bug report. In the mean time, do you know if this sounds like any known issues?
     
  10. HugeWill

    HugeWill

    Joined:
    Nov 4, 2016
    Posts:
    27
    I'm getting the exact same issue. Other members in my team aren't getting the same problem, the only difference I can think of is that I'm on windows 11 and they are on windows 10.
    Also they have cache server enabled where as I don't.

    Hope this information might be of some use
     
  11. jperry_oddgames

    jperry_oddgames

    Joined:
    Sep 18, 2017
    Posts:
    62
  12. Tony1974

    Tony1974

    Joined:
    May 26, 2018
    Posts:
    10
    Regarding the content build failure, I get this error quite often, but only if I have been working on other things prior to doing a build.

    As a work around, I simply restart Unity and immediately try again. This works for me every time.

    So it seems that there may be some corruption in the memory that develops while using Unity that prevents building addressables that can only be cleared by restarting the editor.
     
    daejungkim1998 likes this.