Search Unity

Download from RemoteAssetCache fails when using Unity Accelerator with Unity 2019.4.36f1

Discussion in 'Unity Accelerator' started by klakshminarasimhan, Jun 3, 2022.

  1. klakshminarasimhan

    klakshminarasimhan

    Joined:
    Jun 3, 2022
    Posts:
    1
    Unity version 2019.4.36f1
    We started using Unity Accelerator for our Android builds.
    The connection to the Unity Accelerator is successful.
    We connect to the Unity Accelerator by adding additional arguments
    Code (CSharp):
    1. -EnableCacheServer true -cacheServerNamespacePrefix abcdefgh
    2. -cacheServerEndpoint ip_address:10080
    EditorSettings.asset has the following settings related to the accelerator
    Code (CSharp):
    1. EditorSettings:
    2.   m_ObjectHideFlags: 0
    3.   serializedVersion: 9
    4.   m_ExternalVersionControlSupport: Visible Meta Files
    5.   m_SerializationMode: 2
    6.   m_LineEndingsForNewScripts: 1
    7.   m_DefaultBehaviorMode: 0
    8.   m_PrefabRegularEnvironment: {fileID: 0}
    9.   m_PrefabUIEnvironment: {fileID: 0}
    10.   m_SpritePackerMode: 2
    11.   m_SpritePackerPaddingPower: 1
    12.   m_EtcTextureCompressorBehavior: 0
    13.   m_EtcTextureFastCompressor: 2
    14.   m_EtcTextureNormalCompressor: 2
    15.   m_EtcTextureBestCompressor: 5
    16.   m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref
    17.   m_ProjectGenerationRootNamespace:
    18.   m_CollabEditorSettings:
    19.     inProgressEnabled: 1
    20.   m_EnableTextureStreamingInEditMode: 1
    21.   m_EnableTextureStreamingInPlayMode: 1
    22.   m_AsyncShaderCompilation: 1
    23.   m_EnterPlayModeOptionsEnabled: 0
    24.   m_EnterPlayModeOptions: 3
    25.   m_ShowLightmapResolutionOverlay: 1
    26.   m_UseLegacyProbeSampleCount: 1
    27.   m_AssetPipelineMode: 1
    28.   m_CacheServerMode: 1
    29.   m_CacheServerEndpoint: ip_address:10080
    30.   m_CacheServerNamespacePrefix: abcdefgh
    31.   m_CacheServerEnableDownload: 1
    32.   m_CacheServerEnableUpload: 1
    -


    I can see from the logs that the upload is done successfully. I see a lot of messages in the log where the artifact uploads were successful. For example,

    Code (CSharp):
    1. RemoteAssetCache - Upload - Artifact - success:true, namespace:abcdefg, key:51373f3cc1608b5316ace5594abe1996
    2.  
    3. RemoteAssetCache - Upload - Artifact - success:true, namespace:abcdefghmetadata, key:5adbc7377e70a0b917330624692181e5
    4. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:748752f0aee9cb149b13dba1bbadbdd3
    5. RemoteAssetCache - Upload - Metadata - success:true, namespace:abcdefghmetadata, key:748752f0aee9cb149b13dba1bbadbdd3
    6. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:748752f0aee9cb149b13dba1bbadbdd3
    7. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:6b186813b2bbfa905e33873cf5634d65
    8.  
    9. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:748752f0aee9cb149b13dba1bbadbdd3
    10. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:6b186813b2bbfa905e33873cf5634d65
    11. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:bb94652c2a72ab2bf5367a78bf46bf24
    12. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:8f16cf53fffd700ecd70aa3571ed66ed
    13. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:c1ff9da3ed0aa6329e14c1f88c438b9f
    14. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:0dfbbf4a1295fe15f28382cd83f67e42
    15.  
    All the logs related to RemoteAssetCache - Download - Metadata have success:false but the uploads are successful. I have tried multiple builds and have also changed the cacheServerNamespacePrefix to a different value but still seeing this issue. Since the assets get imported every time instead of downloading from the Unity accelerator, the build time is high.

    Any ideas on what might be the issue?
     
  2. kirkchen

    kirkchen

    Unity Technologies

    Joined:
    May 18, 2018
    Posts:
    18
    There seems to be some inconsistency in the namespace between abcdefg, and abcdefgh. Perhaps a typo in the configuration?
     
  3. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    173
    Code (CSharp):
    1. RemoteAssetCache - Download - Metadata - success:false, namespace:abcdefghmetadata, key:748752f0aee9cb149b13dba1bbadbdd3
    2. RemoteAssetCache - Upload - Metadata - success:true, namespace:abcdefghmetadata, key:748752f0aee9cb149b13dba1bbadbdd3
    I think what this means is the client requested to download an asset with hash 748752f0aee9cb149b13dba1bbadbdd3, but the server does not have it cached yet, so the client downloaded/generated the asset itself, and then upload it to the server, hence the line "Upload - Metadata - success:true, namespace:abcdefghmetadata, key:748752f0aee9cb149b13dba1bbadbdd3" in the next line.

    Next time a client request the file 748752f0aee9cb149b13dba1bbadbdd3 and if it's still on the server, it should download successful
     
  4. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    Hi. I also encountered this problem, have you solved it?