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

Addressable Assets Error: INCORRECT HASH

Discussion in 'Editor & General Support' started by martin_unity660, Oct 16, 2019.

  1. martin_unity660

    martin_unity660

    Joined:
    Feb 15, 2019
    Posts:
    22
    Hi,

    since a couple of days we have the error INCORRECT HASH when building the Addressables Assets for our project.

    The full error looks like this:
    Code (CSharp):
    1. Exception: INCORRECT HASH: the same hash (53430400) for different dependency lists:
    2. source 1: System.Collections.Generic.HashSet`1[System.Object]
    3. source 2: System.Collections.Generic.HashSet`1[System.Object]
    4.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.CalculateCollectedHash (System.Collections.Generic.List`1[T] objects, System.Collections.Generic.Dictionary`2[TKey,TValue] hashSources) [0x0002d] in /p4/ghost-racing/incrementalDev/client-ios/client/GhostRacing/Library/PackageCache/com.unity.addressables@1.2.4/Runtime/ResourceLocators/ContentCatalogData.cs:499
    5.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.SetData (System.Collections.Generic.IList`1[T] data) [0x0027f] in /p4/ghost-racing/incrementalDev/client-ios/client/GhostRacing/Library/PackageCache/com.unity.addressables@1.2.4/Runtime/ResourceLocators/ContentCatalogData.cs:424
    6.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData..ctor (System.Collections.Generic.IList`1[T] entries) [0x0004b] in /p4/ghost-racing/incrementalDev/client-ios/client/GhostRacing/Library/PackageCache/com.unity.addressables@1.2.4/Runtime/ResourceLocators/ContentCatalogData.cs:308
    7.   at UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.DoBuild[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput, UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext aaContext) [0x00283] in /p4/ghost-racing/incrementalDev/client-ios/client/GhostRacing/Library/PackageCache/com.unity.addressables@1.2.4/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:157
    8.   at UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.BuildDataImplementation[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) [0x00149] in /p4/ghost-racing/incrementalDev/client-ios/client/GhostRacing/Library/PackageCache/com.unity.addressables@1.2.4/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:91
    9.   at UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase.BuildData[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) [0x00059] in /p4/ghost-racing/incrementalDev/client-ios/client/GhostRacing/Library/PackageCache/com.unity.addressables@1.2.4/Editor/Build/DataBuilders/BuildScriptBase.cs:63
    10.   at VLive.Tools.Application.Editor.Builder.Build () [0x005bd] in /p4/ghost-racing/incrementalDev/client-ios/client/GhostRacing/Assets/Tools/Application/Editor/Scripts/Builder.cs:293
    The error is not 100% reproducible. 7 of 10 times the build of the addressable assets is failing with with INCORRECT HASH.

    Unity: 2018.4.8f1
    Addressables: 1.2.4

    [Update]
    I found in the the Addressables 1.2.2 release notes: Fixed hash calculations to avoid collisions.
    It seems the change in the hash calculation is causing the issue. We had to downgrade downgrade to 1.1.10.
     
    Last edited: Oct 16, 2019
  2. CodeBombQuinn

    CodeBombQuinn

    Joined:
    Apr 17, 2018
    Posts:
    23
    I also just updated to 1.2.4 and see this happening on our build machines. I was previously on 1.1.10 also and didn't have this issue. Looks like I'll have to revert back now.

    I'm in Unity 2019.1.11f1
     
  3. CodeBombQuinn

    CodeBombQuinn

    Joined:
    Apr 17, 2018
    Posts:
    23
    @DavidUnity3d Is there a way to move this post into the Addressables forums? Don't want it to go unnoticed.
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey @CodeBombQuinn I'm not sure if we can move the thread. I'll check. Thanks for pinging me. For the actual issue @martin_unity660 we have a fix that has just gone into our master branch to fix the hashing. It'll be available in the next Addressables release. Hope that helps!
     
    CodeBombQuinn likes this.
  5. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
  6. martin_unity660

    martin_unity660

    Joined:
    Feb 15, 2019
    Posts:
    22
    davidla_unity likes this.