Unity-Technologies / Addressables-Sample

Demo project using Addressables package
1.29k stars 298 forks source link

Build error (bundle does not exist) when building Play Asset Delivery #54

Open Adam-Weesner opened 3 years ago

Adam-Weesner commented 3 years ago

I'm receiving an error when building the Play Asset Delivery. My version of Addressables is at 1.18.15. I'm also using the exact Unity version (2020.3.15f2) that the sample uses. When I select Build > New Build > Play Asset Delivery, I receive this error:

Library/com.unity.addressables/aa/Android/Android/mountainartstatic_assets_all.bundle does not exist
UnityEditor.GenericMenu:CatchMenu (object,string[],int)

Addressable content build failure (duration : 0:00:00)
UnityEditor.GenericMenu:CatchMenu (object,string[],int)

It seems to occur on the first addressable group with "FastFolowContent". AlI of my groups have the Asset Bundle Provider set to use the “Play Asset Delivery Provider”. I tried a few different methods to fix this, such as setting different Bundle Naming Modes on that group, changing the compression method, shortening the name of the group, etc... This is what the offending group looks like.

image

Any ideas?

kirstenpilla commented 2 years ago

Hi @Adam-Weesner I think I've mentioned this fix on the forums, but here it is! #55 For any future bugs, please report them through the regular bug submission process https://unity3d.com/unity/qa/bug-reporting

Stephan-FDG commented 2 years ago

Hi, unfortunately I am running into the same problem What forum post are you referring to? because I was unable to find the forum post Thanks for any help

kirstenpilla commented 2 years ago

Hi @Stephan-FDG this is the post https://forum.unity.com/threads/using-addressables-along-with-google-play-asset-delivery.905831/page-2#post-7429220. It still refers to the same PR/fix that was merged in (#55) though.

Are you still experiencing the issue with the fix pulled down? If so, are the reproduction steps the same?

Stephan-FDG commented 2 years ago

Hi @kirstenpilla thank you for your fast response!

I can reproduce the Error with the following Steps:

The Following Error is show:

Building Library/Bee/artifacts/Android/AssetPacks/assets_info.json failed with output:
System.IO.FileNotFoundException: Could not find file '/Users/USER/Documents/GITHub/pad/Advanced/Play Asset Delivery/Library/com.unity.addressables/aa/Android/Android/fastfollowcontent_assets_all_837617499298fc018d18194687b60895.bundle'.
File name: '/Users/jack/Documents/003.FDG/001.Projects/GITHub/pad/Advanced/Play Asset Delivery/Library/com.unity.addressables/aa/Android/Android/fastfollowcontent_assets_all_837617499298fc018d18194687b60895.bundle'
   at System.IO.FileInfo.get_Length()
   at NiceIO.NPath.SystemIOFileSystem.File_GetSize(NPath path)
   at NiceIO.NPath.GetFileSize()
   at Unity.Android.Gradle.AssetPacksDistribution.RegisterAsset(NPath srcPath, AssetType assetType)
   at AndroidPlayerBuildProgram.Actions.ActionAssetPackDistribution.Run(CSharpActionContext context, Arguments arguments)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

I also cloned the project from the PR and there I cannot build android at all with Unity 2021.2.11f1 Addressables Version is 1.19.17

kirstenpilla commented 2 years ago

Thanks @Stephan-FDG this issue is slightly different from what was originally reported in the thread. The original gets the error logged when building Addressables with the "Play Asset Delivery" BuildScript, whereas yours occurs when building the player.

One thing I see is that your project path length is a bit long. Could you try moving the project closer to the root directory?

kirstenpilla commented 2 years ago

Nevermind I was able to reproduce the issue, and created a bug ticket for it. Another forum thread was reporting the same issue https://forum.unity.com/threads/building-custom-asset-packs-for-pad-causes-build-to-fail.1246468/.