Search Unity

Local Hosting Example Problems

Discussion in 'Addressables' started by hololabs, Jan 14, 2020.

  1. hololabs

    hololabs

    Joined:
    Nov 15, 2012
    Posts:
    20
    Hi, I'm running into some errors attempting to test a local hosting set up using Addressables Hosting following the documentation outlined here https://docs.unity3d.com/Packages/c.../manual/AddressableAssetsHostingServices.html

    I get the following errors:
    Code (CSharp):
    1. 192.168.1.96 - - [2020-01-14T14:29:50.3982235-08:00] "" 404 -
    2. System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()
    Code (CSharp):
    1. Exception encountered in operation Resource<Object>(catalog_2020.01.14.22.12.04.hash): Unknown error in AsyncOperation
    2. UnityEngine.AsyncOperation:InvokeCompletionEvent() (at C:/buildslave/unity/build/Runtime/Export/Scripting/AsyncOperation.cs:21)
    Code (CSharp):
    1. Exception encountered in operation Dependencies: Unknown error in AsyncOperation
    2. UnityEngine.ResourceManagement.AsyncOperations.GroupOperation:OnOperationCompleted(AsyncOperationHandle)
    3. DelegateList`1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.3.8/Runtime/ResourceManager/Util/DelegateList.cs:69)
    4. UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    5. MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.3.8/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:19)
    6.  
    I'm using the Sprite Land example as a basis for this test. (https://github.com/Unity-Technologies/Addressables-Sample) 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.
     

    Attached Files:

    ryan-at-melcher likes this.
  2. Shaunyowns

    Shaunyowns

    Joined:
    Nov 4, 2019
    Posts:
    328
    Hey @hololabs I'll send this over and we'll see what we can do!
     
  3. unity_w2eYOXukn7BVug

    unity_w2eYOXukn7BVug

    Joined:
    Sep 4, 2018
    Posts:
    1
  4. gijsbeijer

    gijsbeijer

    Joined:
    Oct 19, 2016
    Posts:
    6
    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
     
    Last edited: May 5, 2020
    Madaconda likes this.
  5. gijsbeijer

    gijsbeijer

    Joined:
    Oct 19, 2016
    Posts:
    6
    @Shaunyowns should I file a bugreport on this or how would this work?
     
  6. wethings

    wethings

    Joined:
    Aug 26, 2018
    Posts:
    28
    lol the best part is trying local hosting will break remote hosting as well. Had to rebuild remote hosting when this happened.
     
    Last edited: Sep 22, 2020
  7. ryan-at-melcher

    ryan-at-melcher

    Joined:
    Oct 22, 2018
    Posts:
    16
    I had similar errors with the same setup:
    Code (CSharp):
    1. RemoteProviderException : Unable to load asset bundle from : http://192.168.0.16:57067/Android/splash_assets_splash/melchersplash_portrait_dcf60232127c37d5489539c6aed00816.bundle
    2. UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
    3. ResponseCode : 404, Method : GET
    4. 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:
    Code (CSharp):
    1. 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 AddressableProfileSettings.png
     
  8. HumansAreBetter

    HumansAreBetter

    Joined:
    Nov 10, 2019
    Posts:
    3
    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.