[Bug] Banks in addressable are not build correclty using Unity Cloud Build

Hello,

We are using addressable with FMOD. When we make a manual build it’s working well but when building on Unity Cloud Build (UCB). It seems that the addressable build do not convert the stub banks into real banks data because the final size of the addressable group is too small. And at runtime I have this error:
Error Unity BankLoadException: [FMOD] Could not load bank ‘Master’ : ERR_FORMAT : Unsupported file or audio format.

Maybe PostDependencyCallback and PostWritingCallback are not working properly for a reason with UCB?
I also had the issues with manual build on Mac the first time I build it. But it generated it correctly the second time without a reason.

Do you have a solution or an idea for this?
Or is it possible to force to build with some lines of code the real bank data to replace the stubs?

Unity version: 2021.3.2f1
Addressable version: 1.19.19 (I tried with 1.21.1)
Fmod version: v2.02.09

Thanks in advance

Ok I solved it. We build Addressables with UCB settings, so they were pre build outside the normal build process that fmod is registered by default. So the stub were not replaced at the correct time. We added EventManager.CopyToStreamingAssets(buildTarget)
and EventManager.UpdateBankStubAssets(buildTarget) to make it work for UCB.

At which point in the process do you do those two calls if I may ask?
Do you call both before building addressables?

To make addressables build, the RefreshBanks() call is vital in batchmode so maybe that should be added to the Addressables documentation

Debug.Log("FMOD: Refresh banks");
        EventManager.RefreshBanks();

        Debug.Log("FMOD: copy to Streaming assets");
        BuildTarget buildTarget = EditorUserBuildSettings.activeBuildTarget;
        EventManager.CopyToStreamingAssets(buildTarget);

        AddressableAssetSettings.BuildPlayerContent(out AddressablesPlayerBuildResult result);
        Debug.Log("FMOD: Building bankStub assets");
        EventManager.UpdateBankStubAssets(buildTarget);