Remote catalog bundle hash sometimes different than generated bundle hash

Unity 2019.4.20f1, Addressables 1.18.13, Android Player

When I build Addressables Content and a Player, the remote catalog sometimes contains the wrong hash for a random bundle. I’m unable to reliably reproduce this issue, it occurs randomly and I only notice it when I try to download all content with Addressables.DownloadDependenciesAsync:

RemoteProviderException: Unable to load asset bundle from : https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.client-api.unity3dusercontent.com/client_api/v1/buckets/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/release_by_badge/latest/entry_by_path/content/?path=Android/r-level-high_coast_00-scenes_scenes_assets/scenes/high_coast_00/high_coast_00+audio.unity_150747b2fab3020da720d72993cf955c.bundle
Rethrow as OperationException: GroupOperation failed because one of its dependencies failed
Rethrow as ResourceManagerException: ProvideResources failed
Rethrow as OperationException: ChainOperation failed because dependent operation failed

I checked the build server and Unity Cloud Content Delivery. The bundle that the build generated is the bundle that was uploaded to Unity Cloud Content Delivery.
However, the remote catalog somehow contains a different bundle hash than the bundle that was actually generated.

Addressables requests:
high_coast_00+audio.unity_150747b2fab3020da720d72993cf955c.bundle
Asset bundle that was built and uploaded for this version is:
high_coast_00+audio.unity_43f74bed67452edf315eb4ab0e4bb721.bundle

How can I fix or workaround this problem?

2 Likes

After a few days of trial&error, I found it’s related to the Bundle Mode setting. Using Pack Separately on an AssetGroup that contains multiple scenes, always causes that a random scene from this group can’t be downloaded. Changing the Bundle Mode to PackTogether works around the issue.

I tried the last couple of hours to reproduce it in a new project, but it doesn’t reproduce. Perhaps it’s related to a certain complexity of the AssetGroup setups and assets in the project?

@TreyK-47 can you please forward this information to the Addressables developers. Perhaps they have an idea why the Bundle Mode setting somehow causes that a different hash is stored in the remote catalog than the bundle is actually named.

EDIT: Yesterday I ran into this problem again. It was again a scene that could not be loaded, but this time the bundle mode wasn’t even “Pack Separately”. My workaround was to delete the Cache Server content, the Library folder and other Unity cache directories. This got rid of the problem for now, but I guess it was just luck and the issue will occur again eventually.

Forwarding this to the team!

1 Like

Any updates on this? I can confirm that every other build the hashes of some assets are wrong and cause errors when trying to download them.It started happening only from version 1.18.13 and worked in 1.18.11.

2 Likes

Hmmm, I’ll create a ticket to look into it. There was an update to bundle hashing between 1.18.13 and 1.18.1, could be related. Sounds like it may be difficult to reproduce, but would either of you be able to share a repro project?

Thank you for the reply. Did you have a chance to look into it yet?

I wish I had a reproduce! I thought it’s related to “Pack Separately”, but the issue occurs with “Pack Together” too. The problem seems totally random. Sometimes a few builds in a row are affected and sometimes days go by (tens of builds) without this issue at all.

I’ve been unable to reproduce it so far. But I have been trying on Windows standalone, it may be that it is Android specific, I’ll check with someone who has an Android to test.

Hey all, I just wanted to pop in and say that Krista and I both have tried to reproduce this issue on various platforms, including Android. No luck so far. We’ll keep and eye out for this, but if you can provide any more info, or preferably submit a bug with a repro project (Peter, I know you said you didn’t have a good repro project at the time, but just if you do get a consistent repro) that’d be awesome.

I apologize for the inconvenience. Hopefully we can get something figured out.

We are in a closed beta environment and are also facing this issue - we have packed seperately as a setting.
If that helps, the game is currently “live” in a closed access environment. Some players can download a remote update without an issue, some others are receiving the hash error mentioned above and have to manually clear their cache where remote content is stored. Affects all platforms, iOS, Android, PC, Mac

1 Like

Hi!
Not sure if this a right thread to post (may be I should create a separate thread or file a bug).
May be you’ll find this useful, in regard to “randomness” of hashes for remote catalog.
I’ve noticed that, sometimes, the hash of remote catalog (and even generated) seems to depends on what scene is opened in Editor at the time of build (?!!).
Probably I’m wrong, but I’ve thought that if build made on the same machine ( :wink: ) and nothing was changed in the related files - the hashes and bundles, and the catalog will be identical each time…

Thanks! :wink:

Here is the video from my test (Unity 2021.2.7, Addressables 1.19.19) and the test project. Tested this on Mac and Windows on my side.

7968408--1021983--Addressables_Test_2.gif

7960182–1020282–Addressables_Test_2.zip (98.1 KB)
7973025–1022961–Addressables_Test_2.mp4.zip (1.4 MB)

I had similar issue before, but I figured out that it was because of the remote catalog wasn’t being downloaded successfully, so the Addressables used the fallback catalog in the device which contained old hashes from previous build. But Addressables handled this silently, which gave me a false sense that everything worked fine. I ended up using Fiddler to check if the remote catalog was really being downloaded, if not, there might be a problem with the remote catalog path.

1 Like

We had similiar issues Android

Hi so I am using “Pack Together” but it never works for me. I tried changing part of of my URL by renaming the file on my server (I can download the bundle using the url so it’s functioning properly; also rebuilt everything) and then I discovered that it is still loading from the old URL like:

[Old URL Here]
UnityWebRequest result: ConnectionError : Cannot resolve destination host
url:
[Same Old URL Here]```

It seems that it always loads from some cache? Would you be able to share how you locate and delete the Cache Server content, the Library folder and other Unity cache directories? Appreciate it much!

( @better_walk_away  I think I ran into the exact same issue that it keeps loading a url from my initial build, but if there is any issue with my remote catalog path, *why* is it that I have no problem loading it in Play mode using any Play Mode Script? Also *how* do you clean the old hashes from previous builds? I tried unistalling my app on my HoloLens deviceand no luck)

It looks like I faced the same issue =(
After building content, I get a remote catalog with one hash and a bundle file with different.
I use a cache server, unity 2022.3.39, and addressable 1.22.3
Now, I am investigating this issue.