Local Hosting Example Problems

Hi, I’m running into some errors attempting to test a local hosting set up using Addressables Hosting following the documentation outlined here Asset Hosting Services | Addressables | 1.5.1

I get the following errors:

192.168.1.96 - - [2020-01-14T14:29:50.3982235-08:00] "" 404 -
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()
Exception encountered in operation Resource<Object>(catalog_2020.01.14.22.12.04.hash): Unknown error in AsyncOperation
UnityEngine.AsyncOperation:InvokeCompletionEvent() (at C:/buildslave/unity/build/Runtime/Export/Scripting/AsyncOperation.cs:21)
Exception encountered in operation Dependencies: Unknown error in AsyncOperation
UnityEngine.ResourceManagement.AsyncOperations.GroupOperation:OnOperationCompleted(AsyncOperationHandle)
DelegateList`1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.3.8/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.ResourceManagement.ResourceManager:Update(Single)
MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.3.8/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:19)

I’m using the Sprite Land example as a basis for this test. (GitHub - Unity-Technologies/Addressables-Sample: Demo project using Addressables package) and I’ve tried this in Addressables 1.3.8 and 1.5.0.

  • I’ve set up a Local Hosting service and enabled it.

  • I’ve set up a new Addressables Profile with the following settings

  • BuildTarget: [UnityEditor.EditorUserBuildSettings.activeBuildTarget]

  • LocalBuildPath: HostedData/[BuildTarget]

  • LocalLoadPath: http://[PrivateIpAddress]:[HostingServicePort]/[BuildTarget]

  • RemoteBuildPath: HostedData/[BuildTarget]

  • RemoteLoadPath: http://[PrivateIpAddress]:[HostingServicePort]/[BuildTarget]

  • In my Addressables Groups window I’ve changed the Play Mode Script to “Use Existing Build”.

  • I have built the bundle.

  • In the AddressableAssetSettings “Build Remote Catalog” is enabled and paths selected.

Running Play in the editor results in these errors. On a build it locks up on these errors. I’m just not sure what I’m doing wrong. Any help would be appreciated.


1 Like

Hey @hololabs I’ll send this over and we’ll see what we can do!

Hi,

I reproduce it on the samples project SpaceShooter (GitHub - Unity-Technologies/Addressables-Sample: Demo project using Addressables package) where I upgraded the Adressable package to 1.5.1.

But I’ve got the error only when building, not in the editor.

Same Problem here, loading from localhost always returns a 404.

So it does fire up the server and it exists but looks like in cannot map the files in ServerData to the right location?

I Logged some stuff in the HttpHostingService and found out, the fullPath (HttpHostingService.cs:241) that is being created is:

ServerData/StandaloneWindows64\StandaloneWindows64/scene01_scenes_all_5c59cbb56e7f085591d1e59cc2a17aa5.bundle

Something goes wrong there (notice the double BuildTargetFolder) thats why it’s not finding the file

1 Like

@Shaunyowns should I file a bugreport on this or how would this work?

lol the best part is trying local hosting will break remote hosting as well. Had to rebuild remote hosting when this happened.

I had similar errors with the same setup:

RemoteProviderException : Unable to load asset bundle from : http://192.168.0.16:57067/Android/splash_assets_splash/melchersplash_portrait_dcf60232127c37d5489539c6aed00816.bundle
UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
ResponseCode : 404, Method : GET
url : http://192.168.0.16:57067/Android/splash_assets_splash/melchersplash_portrait_dcf60232127c37d5489539c6aed00816.bundle

Accessing the url in a browser would log a 404 to Unity’s console:

192.168.0.16 - - [2022-02-17T12:48:28.9140826-06:00] "" 404 -

Seeing what @gijsbeijer said about duplicate build targets in the url, I played around with the path and found removing [BuildTarget] from RemoteLoadPath made it work. I rebuilt the groups and all seems to be fine now

Had same issue with sample unity project “Loady Dungeons”, only after i deleted whole “Library” folder and rebuilt the addressables - it finally worked and assets loaded from my localy hosted asp.net web api.