CI Builds and Hosting Profile

Hello. I have my app configured and working loading assets remotely from my local machine across the local network. This is fine. The IP address is set to my local machine:

6713200--771724--upload_2021-1-11_18-5-19.png

When testing locally, I build out the current addressable content groups, then build to Xcode → device. Load the app and the assets load fine. The problem is when I move to CI (custom, not UCB)

I call the following in my build script just before BuildPlayer. I can see my packages in the ServerData/iOS directory on CI.

AddressableAssetSettings.CleanPlayerContent(AddressableAssetSettingsDefaultObject.Settings.ActivePlayerDataBuilder);
            AddressableAssetSettings.BuildPlayerContent();

I download these items to my local PC for testing and copy them to the same ServerData/iOS folder, assuming that the IP address used will be the same. However, it is not.

Exception encountered in operation Resource<IAssetBundleResource>(defaultlocalgroup_unitybuiltinshaders_f8170b535f7dcf495a03d9ea54f28597.bundle), status=Failed, result= : RemoteAssetBundleProvider unable to load from url http://10.0.0.3:50872/defaultlocalgroup_unitybuiltinshaders_f8170b535f7dcf495a03d9ea54f28597.bundle, result='Request timeout'.
UnityEngine.AsyncOperation:InvokeCompletionEvent()

This is the above error for the default local group. All items appear to fail to load. The IP address is not that one configured in Editor and selected as active.

What am I doing wrong? :slight_smile: CI cleans the build completely, but I confirmed that this config is set correctly in source control, so it should be getting passed along to CI. Do I need to set Hosting Profile manually in the build script? I figure I’d need to do this for Debug and Production builds anyway, so how is this done? Thanks.

Following up on this. First, some more info that I forgot previously:

  • Unity version: 2019.4.15f1
  • Addressables Version: 1.16.15
  • CI: Jenkins + Fastlane

I’m still unable to test CI builds against my local Editor Hosted server. But, I have managed to confirm that it is using the right profile and set the correct profile in the build script:

AddressableAssetSettingsDefaultObject.Settings.activeProfileId = AddressableAssetSettingsDefaultObject.Settings.profileSettings.GetProfileId("EditorHosted_Testing");
AddressableAssetSettings.CleanPlayerContent(AddressableAssetSettingsDefaultObject.Settings.ActivePlayerDataBuilder);
AddressableAssetSettings.BuildPlayerContent();

This is the complete code that performs the content build. The content gets built to: ./ServerData/iOS both locally and on CI and this is successful. The following in the Profile config that I am using:

The following error message appears when trying to load the default group:

Exception encountered in operation Resource<IAssetBundleResource>(defaultlocalgroup_unitybuiltinshaders_f8170b535f7dcf495a03d9ea54f28597.bundle), status=Failed, result= : RemoteAssetBundleProvider unable to load from url http://10.0.0.3:50872/defaultlocalgroup_unitybuiltinshaders_f8170b535f7dcf495a03d9ea54f28597.bundle, result='Request timeout'.
UnityEngine.AsyncOperation:InvokeCompletionEvent()

When building out locally, the IP address appears to be that displayed in the editor: 192.168.1.100 on my local network. I’m not a network guy and not sure how this is supposed to work or how we’re suppose to set this up, but it doesn’t work. I also copy down the built group bundles and catalog files to my local machine for testing, naturally.

How do we test Addressables built on another machine (and the client) on our local server?

OK, seems like PrivateIPAddress is updated on whatever machine builds it to its internal local IP address. Which makes some amount of sense.

Is there a way to change this at runtime? Would be handy to do this when testing.