1.17.5-preview not working on cloud build?

We recently updated Addressables for the new sync addressables feature introduced in the 1.17x preview versions. And now our cloud builds are failing.

Building locally works fine. Is this a known issue?

Let me kick this to the team for some insight.

Thanks. Some more info if it helps:

6844562--796856--build.png

Sorry to bump. @TreyK-47 any word on this issue?
We’re a bit blocked on building/distributing our game over cloud.

Hi,

It isn’t clear what could be happening here.
Can you answer these questions and see if they point us closer?

Was the working version previously 1.17.4?
Are you doing a new Addressables build or a content update build?

We updated from 1.16.5 to 1.17.5
Didn’t try 1.17.4.

We’re doing a full build of Addressables. Have also tried clean library build as well

Ok, thanks.
There should not be any difference between your local builds and the UCB.
Could you try add the following code to your local builds, and perform the same build as you do with UCB?

[InitializeOnLoad]
public class CheckForFileExists
{
    static CheckForFileExists() => UnityEditor.AddressableAssets.Build.BuildScript.buildCompleted += result =>
    {
        foreach (string path in result.FileRegistry.GetFilePaths())
            if (!File.Exists(path))
                Debug.LogError($"File {path} - Is missing");
    };
}

Sure thing. I’ll kick off a build shortly

The above error log does not output. But build still fails on UCB.
Local still works with no error logs

[Unity] DisplayProgressbar: Archive And Compress Bundles
[Unity] DisplayProgressbar: Generate Location Lists Task
[Unity] DisplayProgressbar: Post Writing Callback
[Unity] DisplayProgressbar: Extract Data Task
[Unity] System memory in use before: 3.59 GB.
[Unity] System memory in use after: 2.45 GB.
[Unity] Unloading 13174 unused Assets to reduce memory usage. Loaded Objects now: 204155.
[Unity] Total: 714.235089 ms (FindLiveObjects: 32.437812 ms CreateObjectMapping: 37.598753 ms MarkObjects: 472.696036 ms  DeleteObjects: 171.501426 ms)
[Unity] Unloading 2435 Unused Serialized files (Serialized files now loaded: 0)
[Unity] System memory in use before: 2.42 GB.
[Unity] System memory in use after: 2.43 GB.
[Unity] Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 204155.
[Unity] Total: 521.107699 ms (FindLiveObjects: 35.285383 ms CreateObjectMapping: 35.922270 ms MarkObjects: 449.572294 ms  DeleteObjects: 0.326053 ms)
[Unity] DisplayProgressbar: Post Processing AssetBundles
[Unity] DisplayProgressbar: Post Processing Catalog Entries
[Unity] Start importing Assets/AddressableAssetsData/iOS using Guid(1683cedab72444db5b73b8db934e571f) Importer(-1,00000000000000000000000000000000)  -> (target hash: 'fdbb8785ba757cc8f11c543877f825fd') in 0.019602 seconds
[Unity] Start importing Assets/AddressableAssetsData/iOS/addressables_content_state.bin using Guid(b267697bffca04b3ab3ca9dec228aa89) Importer(-1,00000000000000000000000000000000)
[Unity]  -> (target hash: 'bc5459662c276235de7c4cb92995263b') in 1.108700 seconds
Aborting batchmode due to failure:
executeMethod method UnityEditor.CloudBuild.Builder.Build threw exception.
[Unity] Refreshing native plugins compatible for Editor in 2.83 ms, found 7 plugins.
[Unity] Preloading 0 native plugins for Editor in 0.00 ms.
[Unity] Refresh completed in 4.376380 seconds.
[Unity] RefreshInfo: RefreshV2(NoUpdateAssetOptions) scanfilter:
[Unity] RefreshProfiler: Total: 4376.354ms
[Unity]     InvokeBeforeRefreshCallbacks: 2.235ms
[Unity]     ApplyChangesToAssetFolders: 0.181ms
[Unity]     WriteModifiedImportersToTextMetaFiles: 0.000ms
[Unity]     CleanLegacyArtifacts: 0.000ms
[Unity]     Scan: 1231.723ms
[Unity]     OnSourceAssetsModified: 0.106ms
[Unity]     UnregisterDeletedAssets: 0.000ms
[Unity]     InitializeImportedAssetsSnapshot: 284.486ms
[Unity]     GetAllGuidsForCategorization: 1.000ms
[Unity]     CategorizeAssets: 11.346ms
[Unity]     ImportAndPostprocessOutOfDateAssets: 2549.516ms (399.691ms without children)
[Unity]         ImportManagerImport: 1367.114ms (237.473ms without children)
[Unity]             ImportInProcess: 1129.540ms
[Unity]             ImportOutOfProcess: 0.000ms
[Unity]             UpdateCategorizedAssets: 0.101ms
[Unity]             RemoteAssetCacheUploadArtifacts: 0.000ms (0.000ms without children)
[Unity]                 RemoteAssetCacheUploadMetadata: 0.000ms
[Unity]             RemoteAssetCacheGetArtifact: 0.000ms (0.000ms without children)
[Unity]                 RemoteAssetCacheFetchMetadata: 0.000ms
[Unity]                 RemoteAssetCacheMatchMetadataResults: 0.000ms
[Unity]                 RemoteAssetCacheDownloadFile: 0.000ms
[Unity]         CompileScripts: 0.000ms
[Unity]         PostProcessAllAssets: 83.902ms
[Unity]         ReloadImportedAssets: 0.003ms
[Unity]         VerifyAssetsAreUpToDateAndCorrect: 0.000ms
[Unity]         EnsureUptoDateAssetsAreRegisteredWithGuidPM: 2.885ms
[Unity]         InitializingProgressBar: 0.006ms
[Unity]         PostProcessAllAssetNotificationsAddChangedAssets: 0.981ms
[Unity]         OnDemandSchedulerStart: 1.196ms
[Unity]         RestoreLoadedAssetsState: 418.773ms
[Unity]     InvokeProjectHasChanged: 0.000ms
[Unity]     UpdateImportedAssetsSnapshot: 274.965ms
[Unity]     ReloadSourceAssets: 180.111ms
[Unity]     UnloadImportedAssets: 0.944ms
[Unity]     Hotreload: 74.403ms
[Unity]     FixTempGuids: 0.045ms
[Unity]     VerifyGuidPMRegistrations: 0.000ms
[Unity]     GatherAllCurrentPrimaryArtifactRevisions: 1.818ms
[Unity]     UnloadStreamsBegin: 0.296ms
[Unity]     LoadedImportedAssetsSnapshotReleaseGCHandles: 10.122ms
[Unity]     GetLoadedSourceAssetsSnapshot: 806.799ms
[Unity]     PersistCurrentRevisions: 0.874ms
[Unity]     UnloadStreamsEnd: 0.684ms
[Unity]     GenerateScriptTypeHashes: 0.000ms
[Unity]     Untracked: -780.334ms
[Unity] EXCEPTION: FileNotFoundException: Library/com.unity.addressables/aa/iOS/iOS/game_assets_all_9310aa591b5b458f28d3508eca65e043.bundle does not exist
[Unity] UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
[Unity] UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
[Unity] UnityEngine.Logger:Log(LogType, Object)
[Unity] UnityEngine.Debug:Log(Object)
[Unity] UnityEditor.CloudBuild.BuildLogger:Log(String)
[Unity] UnityEditor.CloudBuild.BuildLogger:HighlightUnityErrors(String, String, LogType)
[Unity] UnityEngine.Application:CallLogCallback(String, String, LogType, Boolean) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Application/Application.cs:121)
[Unity] (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Application/Application.cs Line: 121)
[Unity] FileNotFoundException: Library/com.unity.addressables/aa/iOS/iOS/game_assets_all_9310aa591b5b458f28d3508eca65e043.bundle does not exist
[Unity]   at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x000b6] in <9577ac7a62ef43179789031239ba8798>:0
[Unity]   at UnityEditor.CloudBuild.Builder.BuildAddressables (UnityEngine.CloudBuild.BuildManifestObject manifest) [0x0019c] in <802c2b1faec944cab083aa412abd8d34>:0
[Unity]   at UnityEditor.CloudBuild.Builder.Build () [0x00178] in <802c2b1faec944cab083aa412abd8d34>:0
[Unity] (Filename: <9577ac7a62ef43179789031239ba8798> Line: 0)
[Unity] ERROR: executeMethod method UnityEditor.CloudBuild.Builder.Build threw exception.
[Unity] UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
[Unity] UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
[Unity] UnityEngine.Logger:Log(LogType, Object)
[Unity] UnityEngine.Debug:Log(Object)
[Unity] UnityEditor.CloudBuild.BuildLogger:Log(String)
[Unity] UnityEditor.CloudBuild.BuildLogger:HighlightUnityErrors(String, String, LogType)
[Unity] UnityEngine.Application:CallLogCallback(String, String, LogType, Boolean) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Application/Application.cs:121)
[Unity] (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Application/Application.cs Line: 121)
[Unity] executeMethod method UnityEditor.CloudBuild.Builder.Build threw exception.
[Unity] (Filename: ./Runtime/Utilities/Argv.cpp Line: 396)
[Unity] AcceleratorClientConnectionCallback - disconnected - :0
[Unity] Native stacktrace:
[Unity]     0   libmonobdwgc-2.0.dylib              0x000000013d72b3dd mono_handle_native_crash + 242
[Unity]     1   libmonobdwgc-2.0.dylib              0x000000013d68b805 mono_sigsegv_signal_handler + 220
[Unity]     2   Unity                               0x000000010e513c1d _Z20burst_signal_handleriP9__siginfoPv + 237
[Unity]     3   libsystem_platform.dylib            0x00007fff703ab5fd _sigtramp + 29
[Unity]     4   ???                                 0x0000000000000000 0x0 + 0
[Unity]     5   Unity                               0x000000010e63086b _Z21SetCurrentMemoryOwnerRK10MemLabelId + 43
[Unity]     6   Unity                               0x000000010e6a0285 _Z22profiler_create_markerPKctN9profiling6Marker5FlagsE + 85
[Unity]     7   Unity                               0x000000010f17a571 _ZN12AudioManager14systemCallbackEP11FMOD_SYSTEM24FMOD_SYSTEM_CALLBACKTYPEPvS3_ + 577
[Unity]     8   Unity                               0x000000011285f899 _ZN4FMOD9DSPFilter4readEPPfPiPj16FMOD_SPEAKERMODEij + 1257
[Unity]     9   Unity                               0x000000011285f4f4 _ZN4FMOD9DSPFilter4readEPPfPiPj16FMOD_SPEAKERMODEij + 324
[Unity]     10  Unity                               0x000000011285f4f4 _ZN4FMOD9DSPFilter4readEPPfPiPj16FMOD_SPEAKERMODEij + 324
[Unity]     11  Unity                               0x000000011285f4f4 _ZN4FMOD9DSPFilter4readEPPfPiPj16FMOD_SPEAKERMODEij + 324
[Unity]     12  Unity                               0x0000000112875177 _ZN4FMOD12DSPSoundCard4readEPvPj16FMOD_SPEAKERMODEij + 135
[Unity]     13  Unity                               0x0000000112883e60 _ZN4FMOD6Output3mixEPvj + 640
[Unity]     14  Unity                               0x0000000112884a51 _ZN4FMOD12OutputPolled10threadFuncEv + 513
[Unity]     15  Unity                               0x00000001128a28b8 _ZN4FMOD6Thread8callbackEPv + 216
[Unity]     16  libsystem_pthread.dylib             0x00007fff703b7109 _pthread_start + 148
[Unity]     17  libsystem_pthread.dylib             0x00007fff703b2b8b thread_start + 15
[Unity] Debug info from gdb:
       Unity ran in '5676.71207' seconds
       ! Unity player export failed!
! build of 'default-ios-addressables-test' failed. exit

Thanks,
hmmm, I am not sure what could be going on. UCB just takes your project and builds it as if it was local. And uses the FileRegistry from that snippet above to collect the built content.
Do you know if game_assets_all that is not found in UCB has been build locally?
You said you are doing a fresh build, the hash should be the same locally as with UCB creating the same file.

No, the asset bundles have not been built locally. We use the option in UCB to build the asset bundles:

6902051--808037--ucb_config.png

We’re not commiting any bundles into the repository. And our gitignore looks like this:

6902051--808040--gitignore.png

All group share same settings:

6902051--808043--game_bundle.png

It’s just really strange that before 1.17.5 we had no issue building the game on UCB

@andymilsom
Found and fixed the issue!

Changed the Bundle Naming Mode from “Filename” to “Append Hash to Filename”
And now CloudBuild finds the files :slight_smile:

But again, strange that “Filename” bundle naming works locally, but not on Cloud

Also discovered that UnityEditor.AddressableAssets.Build.BuildScript.buildCompleted does not get called on Cloud Build

Thats great you found the problem.
Hmm, we did change some code around “Filename”, both creating a bug and then fixing said bug. But that only affected the built catalog and had no impact on the generated FileRegistry. I’ll have a look more, perhaps I am missing something there

Experiencing the same issue.
Changing Bundle Naming Mode from “Filename” to “Append Hash to Filename” does fix the build.
But why UCB ignores group settings? We don’t really want to have hashes in filenames.

@andymilsom
Is there any workaround?
we use Unity 2019.4.X and Addressables 1.16.X

We have a fix incoming for this, I cannot see any work-around.
If you can use append hash mode until the release will be easiest. If you cannot wait you could copy the Addressables package into your local project and edit the code. It needs to change the FileRegistry to remove the hash.
I have attached the fix if you want to change your project. But the fix should be out soon.

6936448–814906–updateFileRegistry.txt (1.43 KB)

1 Like