Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Unity Exception encountered in operation Resource

Discussion in 'Addressables' started by zyonneo, Dec 17, 2020.

  1. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    381
    I get the following error when trying to get the addressable data and instantiate an object.
    Code (CSharp):
    1.  
    2. 2020-12-18 01:00:44.709 29957 9621 Error Unity Exception encountered in operation Resource<IAssetBundleResource>(prefab_assets_all_51075e0f226e599c58238aba4ab95821.bundle): RemoteAssetBundleProvider unable to load from url https://github.com/Name-company/Addressable/Android/prefab_assets_all_51075e0f226e599c58238aba4ab95821.bundle, result='HTTP/1.1 404 Not Found'.
    3. 2020-12-18 01:00:44.709 29957 9621 Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    4. 2020-12-18 01:00:44.709 29957 9621 Error Unity
    5. 2020-12-18 01:00:44.724 29957 9621 Error Unity Exception encountered in operation Dependencies: RemoteAssetBundleProvider unable to load from url https://github.com/Name-company/Addressable/Android/prefab_assets_all_51075e0f226e599c58238aba4ab95821.bundle, result='HTTP/1.1 404 Not Found'.
    6. 2020-12-18 01:00:44.724 29957 9621 Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    7. 2020-12-18 01:00:44.725 29957 9621 Error Unity Exception encountered in operation Resource<GameObject>(Cube.prefab): Dependency Exception
    8. 2020-12-18 01:00:44.725 29957 9621 Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    9. 2020-12-18 01:00:44.725 29957 9621 Error Unity Exception encountered in operation Dependencies: Dependency Exception
    10. 2020-12-18 01:00:44.725 29957 9621 Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    11.  
    But when I check the Json file on the server data folder outside assets,which I upload later into github webpage I can see the bundle there.I don't know why the error showing - HTTP/1.1 404 Not Found. as the data is still there in the Json file(Parts of the json file given beow).

    Code (CSharp):
    1.  
    2. 55    "https://github.com/Name-Company/Addressable/Android/prefab_assets_all_51075e0f226e599c58238aba4ab95821.bundle"
    3. 56    "Assets/Prefabs/Cube.prefab"
    4. 57    "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/Android/defaultlocalgroup_unitybuiltinshaders_789bb0c4b5bc1f62c7c6fec9891efb0f.bundle"
    5. .
    6. .
    7. .
    8. .
    9. 112 "prefab_assets_all_51075e0f226e599c58238aba4ab95821.bundle"
    10. 113 "Assets/Prefabs/Cube.prefab"
    11. 114 "5d391ea64ae74c3479a03bc143932670"
    12. 115 "Models"
    13. 116 "defaultlocalgroup_unitybuiltinshaders_789bb0c4b5bc1f62c7c6fec9891efb0f.bundle"
    14.  
    15.  
    From one scene I login and reach another scene. So in that scene there is an empty GameObject where I attach the below script.At start I am trying to do the AsyncOperation.
    I believe in the Start method itself the exception is encountered.
    Code (CSharp):
    1.  
    2. void Start()
    3.     {
    4.        // 'Label name given------ 'Models'
    5.         Addressables.LoadAssetsAsync<GameObject>("Models", OnLoadDone);
    6.  
    7.     }
    8.  
    9. //Initially just trying to print names of the GameObjects
    10.     private void OnLoadDone(GameObject obj)
    11.     {
    12.         LoadedAssets.Add(obj);
    13.  
    14.         Debug.Log("Count  " + loadedAssets.Count);
    15.         for (int i = 0; i < loadedAssets.Count; i++)
    16.         {    
    17.             Debug.Log("Load Assets name " + loadedAssets[i].name);
    18.             //Instantiate(loadedAssets[i]);
    19.         }
    20.     }
     
    Last edited: Dec 18, 2020
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,698
    Let me see if the team has any guidance. Which version of Addressables are you on?
     
unityunity