Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug System.Exception:Invalid path in TextDataProvider:'Library/com.unity.addressables/aa/Android/

Discussion in 'Addressables' started by mkssanudeep, Feb 20, 2022.

  1. mkssanudeep

    mkssanudeep

    Joined:
    Dec 3, 2020
    Posts:
    15
    System.Exception: Invalid path in TextDataProvider : 'Library/com.unity.addressables/aa/Android/settings.json'.
    My game scene, which specifically loads all the addressables work absolutely fine, when I run the scene alone, or when even navigate to the game scene from the main menu scene. However, this exception shows up when I log into my account(Azure's Playfab) and then proceed to the same i.e. navigate to the game scene from the main menu scene, I get this.

    Not really sure what went wrong here, since it only happens when I log into the player account.
     

    Attached Files:

  2. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hm, that's odd. I know there were some issues that sound familiar to that. It was a few versions ago, I think. I'm not sure what version you're on but you might try updating to 1.19.18 (the latest at the time of writing) and seeing if the problem persists. If you're already on the latest then I'd suggest filing a bug if you can. Since it involves logging into the azure account that might be tricky.

    I know in some other threads you've mentioned doing some custom build scripts and things, are you doing anything different during the initialization based on login status/player id/anything? If so, that might be worth looking at.
     
  3. mkssanudeep

    mkssanudeep

    Joined:
    Dec 3, 2020
    Posts:
    15
    I have updated it to the latest version and this issue still persists.
    I am not doing anything different during the initialization based on login status/player id.

    Lets say I have three particular scenes, Login/Signup Scene, Main Menu and the Game scene.

    Without the login, I am able to load the addressable I need for the game scene, however when i log in It doesn't seem to work.
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Huh, that's really strange. Unfortunately, I don't have much in the way of advice I can give at the moment. If you can file a bug with Unity that includes your project so we can repro it, that'd go a long way toward helping resolve the issue.

    Thanks. Sorry I couldn't be more help right now.
     
  5. sergioabril

    sergioabril

    Joined:
    Jan 11, 2016
    Posts:
    33
    @davidla_unity
    This just happened to me on an iOS build (or something similar). The thing is, rebuilding the game binary on Unity without changing anything (not even building the addressables manually), fixed it. It happened out of nowhere, and it just went away. I can say it happens to me every some builds (let's say every ~20 builds), and I'm not sure what could be causing it. Seems random.

    I was able to grab these logs from the game binary itself when it failed loading:
    (I was loading a bunch of localisation data files that I store on an addressable group with a label called "localization")

    Code (CSharp):
    1. [Debug.Log][Landing] Start
    2. onesland.LandingScreenController:Start()
    3.  
    4.  
    5. [Debug.Log][Landing] Subscribing
    6. onesland.LandingScreenController:Subscribe()
    7. onesland.LandingScreenController:Start()
    8.  
    9.  
    10. [Debug.Log][LanguageManage] Reading languages
    11. onesland.<R_LoadLanguages>d__12:MoveNext()
    12. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    13.  
    14.  
    15. [Debug.Error]System.Exception: Invalid path in TextDataProvider : '/private/var/containers/Bundle/Application/87751BF8-D77C-4807-A49F-BF3382430EB2/1sland.app/Data/Raw/aa/settings.json'.
    16. UnityEngine.AddressableAssets.Addressables:LoadAssetsAsync(Object, Action`1)
    17. onesland.<R_LoadLanguages>d__12:MoveNext()
    18. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    19.  
    20.  
    21. [Debug.Error]RuntimeData is null.  Please ensure you have built the correct Player Content.
    22. UnityEngine.AddressableAssets.Addressables:LoadAssetsAsync(Object, Action`1)
    23. onesland.<R_LoadLanguages>d__12:MoveNext()
    24. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    25.  
    26.  
    27. [Debug.Warning]Addressables - Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].
    28. UnityEngine.AddressableAssets.Addressables:LoadAssetsAsync(Object, Action`1)
    29. onesland.<R_LoadLanguages>d__12:MoveNext()
    30. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    31.  
    32.  
    33. [Debug.Error]OperationException : Addressables - Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].
    34.  
    35. UnityEngine.AddressableAssets.Addressables:LoadAssetsAsync(Object, Action`1)
    36. onesland.<R_LoadLanguages>d__12:MoveNext()
    37. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    38.  
    39.  
    40. [Debug.Error]UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=localization, Type=onesland.LanguageData
    41. UnityEngine.AddressableAssets.Addressables:LoadAssetsAsync(Object, Action`1)
    42. onesland.<R_LoadLanguages>d__12:MoveNext()
    43. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    44.  
    45.  
    46. [Debug.Error]OperationException : ChainOperation failed because dependent operation failed
    47. UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=localization, Type=onesland.LanguageData
    48. System.Action`1:Invoke(T)
    49. DelegateList`1:Invoke(T)
    50. System.Action`1:Invoke(T)
    51.  
    52.  
    53. [Debug.Log][LanguageManage][Addressables] Languages completed task!: Failed
    54. onesland.<>c__DisplayClass12_0:<R_LoadLanguages>b__0(AsyncOperationHandle`1)
    55. System.Action`1:Invoke(T)
    56. DelegateList`1:Invoke(T)
    57. System.Action`1:Invoke(T)
     
    Last edited: Mar 5, 2022
  6. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    @sergioabril yeah, that's very odd. So, one this you might can try upgrading Addressables to 1.19.19 and then making sure your editor version is on 2021.2 or newer. The reason being is that that Editor version contains a new player build processor that doesn't appear to cause that issue. You also have to be on a fairly recent version of Addressables. I recommend 1.19.19 just because it's the latest at the time of writing.

    For cases where it specifically can't find the settings.json I think we're hitting an editor bug in the player build processor that's causing some code we have to move temporary files back from StreamingAssets into the Library. What we've been able to reproduce locally is very odd. We have an [InitializeOnLoadMethod] which is the method we use for cleanup. We tagged it with that in case of a crash/build failure. If something went wrong, it could still clean up after itself. However, something that can happen very sporadically, like you're saying, is that that code executes after the IPrebuildSetup, but before the actual build takes place. I wasn't able to reproduce it on the newer stuff, like I mentioned. I don't know if the build team can fix this issue in the old player build processor or not, honestly.

    That may not be what you're running into. I'm starting to think that people are able to hit this type of issue in several ways, which makes it confusing to track down the cause.

    Whether you try upgrading or not, feel free to file a bug with your repro project if you're able to. If it's something on our end we'll dig into it, otherwise it'll hopefully get to the appropriate team to have a look.
     
  7. sergioabril

    sergioabril

    Joined:
    Jan 11, 2016
    Posts:
    33
    @davidla_unity Thank you so much for that explanation; it's indeed very odd. I might upgrade to 2021.2 soon, but sadly, It will have to wait, as I'm using 2020LTS for a production build, and can't update right now.

    If I'm able to reproduce it, I'll file a bug report right away; otherwise, I might still do it, but would make things complicated. Other thing that could be affecting this randomness (but I don't know how), is the stability of my internet connection. I'm spending a few days on a place with intermittent connection (micro interruptions from time to time, enough to cancel file uploads, etc), and I've noticed that I get the editor warning from time to time, saying "Unable to access Unity Services". Even though I make sure to only produce builds when this is not shown, I was wondering if, getting a connection interruption in the middle of building, could somehow cause an exception or an event that could led to this odd Addressables bug... Might not even be related, but I have the feeling I'm getting this Addressables problem more often since staying on this place with bad connection. Could be just that, a subjective feeling.