[Addressables 1.19.9] Addressables freezing under a certain condition

I have a setup where a method is marked with
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] and it calls Addressables.LoadAssetAsync("Label") and then WaitForCompletion().

However, when I have Remote Catalog turned on with a Local Host that is not enabled
the editor freezes (or if built, the app hangs).
When I turn on the local host, it works normally.

This behaviour causes for concern because when the server is unavailable, the app would hang.
Setting a timeout does not work.

When I debug it, it is infinitely looping in the WaitForCompletion. So I pause the debugging and force it to throw an exception. It then continues normally.
It’s as if Addressables hasn’t been initialized yet. So which I tried calling Addressables.InitializeAsync and also WaitForCompletion, but I’d get the same loop.

The bundle itself is configured to use the Built-In paths. So I expected it to load just fine as a Streaming Asset. But as soon as Remote catalogs are enabled, it freezes when the online location is not available.

I believe you run into this issue: https://discussions.unity.com/t/845572

If the hosting service is unavailable, most Addressable calls never return.

You can workaround this bug by specifying a timeout greater than 0 for the “Catalog Download Timeout” property found in the AddressableAssetSettings, as well as for the “Request Timeout” in all AssetGroups.

1 Like

I had tried the catalog timeout, but I haven’t tried the asset groups. I’ll see if I can try that today, if I have spare time.