WebGL builds add a hash to the scene asset bundle .manifest files when building asset bundles

Hello,

we are having an issue since Unity 2022.3.5+ with WebGL cloud build (and also local builds) where Unity adds a “hash” to the scene asset bundle .manifest files when building asset bundles. This makes the builds crash and not be able to find the correct files.

The bug only appears for the scene asset bundle files where the name of the files are usually “scenes_blah_blah” where their manifest file becomes “scenes_blah_blah_a32bitHash”.

This has been happening for a while and it made us create a script where we manually correct these files before continuing the build.

We have checked our scripts and we could not find any custom manipulation of the manifests. That being said, if we change the Unity version to 2022.3.4 and lower, this problem does not happen.

Here is the log for one of the failed builds. The main lines to look for in the build are:

[warning] [2024-03-07T08:44:23Z - Unity] EXCEPTION: FileNotFoundException: Could not find file "/BUILD_PATH/sevenshapes.sevenshapes2019.ssd2019_ci_qa04/SevenShapesSchool/AssetsBundle/WebGL/basegame/scenes_5s_game_construction.manifest"

[error] [2024-03-07T08:44:23Z - Unity] ERROR: executeMethod method UnityEditor.CloudBuild.Builder.Build threw exception.

[error] [2024-03-07T08:44:23.550Z] - 7.3.35.2.7.4 - FATAL: ! Unity player export failed!

Here is the link to the Full log.

There is a Player Settings option (near the bottom) to generate hashes for filenames. Check if that is enabled.

I’m not sure if you are talking about this option but I tried enabling/disabling it and I had the same problem either way.

9693332--1383113--upload_2024-3-11_12-5-32.png

To explore the problem a bit more, I have created an empty project and added some prefabs and scenes as Asset Bundles. I built the asset bundles using Unity 2022.3.4 and 2022.3.20.

In case of 2022.3.4 I had the correct manifest files, without the hash. (test1 and test2 are the scenes)
9693350--1383122--upload_2024-3-11_12-8-50.png

In case of 2022.3.20 I had hashes attached to the end of the manfiest file:

I didn’t touch the settings or anything between two versions.
I have submitted a bug since I don’t think it’s a normal behaviour. But any ideas would be appreciated?

After talking to support and providing them with examples, it turned out that it is a Unity bug. I have submitted the bug report and the issue UUM-66821 is “Under Consideration for 2021.3.X, 2022.3.X”. Here is the link to the issue.
Hopefully it will get fixed soon.