RemoteProviderException: TextDataProvider : unable to load "assets/aa/settings.json"

Unfortunately it continues to be an issue. We no longer use any remote functionality from Addressables, everything is bundled with the app. However, on Android some players (around 250 each month) continue to get this error and the game doesn’t start in this case:

RemoteProviderException: TextDataProvider :
unable to load from url :
jar:file:///data/app/com.companyname.productname-Ror-4rjfK_TfMis4oZpd1w==/base.apk!/assets/aa/settings.json

Where “com.companyname.productname” represents the bundle identifier.

The game is using Addressables 1.19.6 and Unity 2019.4.35f1. The problem seems to occur on Android only. I’m unable to reproduce the issue. All I see is angry players leaving 1 star reviews complaining that the game doesn’t start and these errors logged in Unity Cloud Diagnostics.

Here’s a list of a view devices, according to Cloud Diagnostics, where this issue occurred:

HUAWEI/PPA-LX1/HWPPA-H
HUAWEI/AGRK-W09/HWAGRK
HUAWEI/AGS3K-L09/HWAGS3K
Sony/XQ-AD52/XQ-AD52
Xiaomi/Redmi Note 9S/curtana
HUAWEI/JNY-LX1/HWJNY
HUAWEI/AUM-L41/HWAUM-Q
HUAWEI/PPA-LX2/HWPPA-H
HUAWEI/STK-LX3/HWSTK-HF
samsung/SM-A125F/a12
HUAWEI/ART-L29/HWART-H

What can I do fix this issue?

I can confirm that I also encounter this issue. Only a small portion of Android players encountered this, it doesn’t occur on iOS. In this case, no catalog is successfully loaded, no remote catalog nor local catalog. And the players just cannot download anything and print out a lot of InvalidKeyExceptions. Addressables puts the setting.json and catalog.json into a StreamingAssets folder, they have to use UnityWebRequest to load them on Android. Maybe we should try to search whether if anyone has encounters issues related to using UnityWebRequest to load streaming assets on Android.

I am using Unity 2019.4.22f1 and Addressables 1.16.19.

I won’t wait for the official reply this time. If there is no catalog being successfully loaded, I can obtain this information through Addressables.ResourceLocators, it should have zero elements. I could call Addressables’ API again and again. If this doesn’t help, I might have to write my own TextDataProvider.

Stumbled across this same issue. Able to successfully load Addressables if I don’t split the build and bundle everything into an APK, however this is not realistic.

This problem occurs when you build the bundle, run the editor, and then build apk

1 Like

The error message is quite misleading but what it essentially means is: “No addressable content found”. This can have many different reasons:

  • The addressable build fails with an exception (see console) - for some unfortunate reason the build still continues without addressables included

  • You chose the wrong profile (iOS instead of android) for addressables - thus the bundles are built for the wrong platform

  • You did not build the addressables at all

I think the Addressable Team should seriously look into their package and improve all errors and exception messages during runtime and also during build time. Generally at some point in the future (sooner than later) I would hope the Addressable Package to be up-to-bar with the Resources.Load System in terms of build-time and run-time features and feedback to the developers.

1 Like

im dealing with this issue
how the hell 3 years past but it still occurs?

@Scarletor you need to rely on latest versions of Unity releases and non-Unity forums and discussion groups. Most of such answers are not found here nor in any official Unity docs.

Best experiment with newest builds, as in our case were able get rid of a lot these anomalies by relying on their new releases.
No point to bring it up to Unity management.

I think, I found a solution.

We got this error.
RemoteProviderException : TextDataProvider : unable to load from url : https://www.****.com/StreamingAssets/aa/settings.json
UnityWebRequest result : ConnectionError : Unknown Error
ResponseCode : 500, Method : GET
url : https://www.***.com/StreamingAssets/aa/settings.json

The issue is not related to Addressables class. This error is generated by the UnityWebRequest class. If I try to fetch the link of the relevant JSON file myself using the UnityWebRequest class, I still get the ‘ConnectionError: Unknown Error’ message. When I read through the decompiled version of the UnityWebRequest class, I noticed that it uses unsafe code.

Therefore, I enabled the ‘Allow unsafe Code’ option from the Player Settings. And my problem was resolved.

2 Likes

This worked for me! thanks!

While it may work… ‘Allow unsafe Code’ is an unacceptable answer imo. Still looking for a reason…

Addressables are truly one of the biggest time sinks in the unity suite of “features”

2 Likes

I still have this problem after using code that allow ‘unsafe’ code, and am considering whether to abandon addressable.
RemoteProviderException : Unable to load asset bundle from : http://Remote server address/ServerData/Android/hotres_assets_all_61ebba93f92e730518806b41d24a7a6d.bundle
UnityWebRequest result : ConnectionError : Unknown Error
ResponseCode : 200, Method : GET
url : http://Remote server address/ServerData/Android/hotres_assets_all_61ebba93f92e730518806b41d24a7a6d.bundle
If other smaller files can be downloaded using addressable, I really don’t want to solve this problem. I don’t know why the above error occurs when the download is larger than 100mb

Encountered this issue when I installed my apk manually (downloaded the apk to the device, installed by opening the apk file)

Fixed by installing the apk via “adb install”
Using Unity’s “Build And Run” option also helps

I’m having the exactly same issue, but in a WebGL build. Unfortunately, “allow unsafe code” didn’t help in my case. When I run the build on another server it works. So I guess it is a server configuration issue, but I have no clue which configuration it can be. Does anyone have a solution?

In my case, the issue was related to the Split Application Binary option. Unity generated a *.main.obb file, and I suspect that the settings.json file (my case) was moved into this *.main.obb file, which wasn’t properly installed with the APK. This is just my guess, and it might not be the actual cause (I was too lazy to dive deep into the problem), but when I turned off the Split Application Binary checkbox, the crash disappeared.

I get this same issue if I enter PlayMode in the editor before building for Android.

RemoteProviderException : TextDataProvider: unable to load file from url ‘/…/assets/aa/settings.json’.

If I open the .apk file and look inside, the message is indeed correct – there is no “aa” folder. Unity’s addressables system manages this folder, so sometimes Unity just decides to not include it in the apk for some reason.

Closing the editor and rebuilding works for me. If you ever enter PlayMode in an editor session, building is no longer an option.

To Reproduce:

  1. make some stuff addressable
  2. do content build
  3. do player build
  4. install and run – notice it works
  5. enter playmode in editor
  6. do player build
  7. install and run – notice this error

You don’t even need to build and run – just append “.zip” to the .apk and poke inside the “assets” folder. If won’t work if there is no “aa” folder.

We have “allow unsafe code” checked (because we use unsafe code in our project).
We have “split application binary” unchecked.

What version of Addressables and Unity are you using?

Addressables 1.21.18
Unity Editor 2020.3

I wrote this build preprocessor script that can at least detect that the build isn’t going to work, so you don’t waste time deploying a borked build.

	/// <summary>
	/// This is required because there's a unity bug where sometimes the addressables don't get copied :(
	/// </summary>
	public sealed class EnsureAddressablesGetCopied : IPreprocessBuildWithReport
	{
		public int callbackOrder => 30; // must be at least 2 to ensure it runs after the built-in addressables post processor

		// sometimes unity doesn't create the folder at //...apk/assets/aa which holds settings.json
		public void OnPreprocessBuild(BuildReport report)
		{
			// check if moving asset bundles failed
			if (!Directory.Exists(Addressables.PlayerBuildDataPath)) // project's StreamingAssets/aa
			{
				// maybe we can try to manually do it?
				throw new BuildFailedException("Unity didn't copy the Addressables folder for you! Try restarting the editor and building again.");
			}
		}
	}

I met the same problem in webGL, have you solved it? My unity version is 2020.3 and addressable version is 1.18.19