Losing my mind over addressables

Hi folks,

I have inherited a project which utilizes both CCD and local addressables. It is also utilizing cloud build. Here is the issue: When I build the game locally, it works flawlessly every time. When I push and build it in the cloud for Android and iOS, it builds without errors, but the resulting build just black-screens. I assume this is because it is not able to load my init scene (which is a local addressable). I have checked the catalogs and they are all pointing to the correct filenames.

To add insult to injury, I built a debug build to see if I could see what was going on, and it loaded up on my Android just fine.

For the record, my cloud build settings (for both iOS and Android) are set to build addressables, upload addressables to CCD, production environment, iOS/Android buckets respectively, and Automatically create a CCD release. My addressables profile is set to Remote: Automatic (production) and Local: Built-in. I’ve also done a clean build and there was no difference.

Any help? I’m not super familiar with addressables, and I am at a complete loss.

Oh that’s delicious!

One cause of that symptom is subtle timing errors completely unrelated to your addressables, just a standard old bog-standard timing bug.

Addressables might be more sensitive to such things as they are async.

Have you pulled any of the runtime logs to see if anything is complaining?

1 Like

Embarrassingly, no I didn’t think of that. I’ll chalk that one up to the sleep deprivation.

Logcat does have an error:
Unable to open archive file: jar:file:///data/app/[All this stuff]/base.apk!/assets/aa/Android/scene-match_scenes_all_d6ef1717487a61889065b707a3611d4f.bundle

You’re on to something here because the hash is different from what the catalog has and what the file is named. So that explains why it’s not loading, at least.

1 Like

Oh how INTERESTING!! Back circa 2016 I was involved in a CI/CD build system where we encountered a very similar situation with Asset Bundles (directly with ABs, as this was long before Addressables wrapped up ABs).

Our issue was that our TeamCity scripts did some whacky stuff to save reimportations, such as caching the entire Library/ folder between steps in the build process, and somehow things got tangled up so that it built the Android app using the iOS catalog, or vice versa, and since the build system had decoupled asset building from app building, there was some way (I forget the details now) that one catalog was inappropriately used by the other target binary.

Now the Unity cloud stuff is out of your sight but I wonder if you could do some testing by turning off only one of those two targets, say skipping iOS, and seeing if the issue goes away?

Ok, I did a clean build of just Android this time and it is still having the exact same issue. Same hashes, too.