No Locales were available

I’m pulling my hair out. Cannot figure out why Unity cannot load Locales.

I have Unity 2020.2.4f1 and Localization 0.10 preview installed. Followed quickstart from Quick Start Guide | Localization | 0.10.0-preview and created string table. For now, it have only en-locale. Also took PreloadingScreen sample from Localization. Still, Locales will be null all the time.

In Project Settings, Available Locales has English(en). Also, this is in Spesific Locale Selector.
Addressables have been built, then Google → Build and run to run on Android.

2021/02/17 23:17:38.185 22524 22567 Error Unity No Locale could be selected:
2021/02/17 23:17:38.185 22524 22567 Error Unity No Locales were available. Did you build the Addressables?
2021/02/17 23:17:38.185 22524 22567 Error Unity The following (3) IStartupLocaleSelectors were used:
2021/02/17 23:17:38.185 22524 22567 Error Unity     UnityEngine.Localization.Settings.CommandLineLocaleSelector
2021/02/17 23:17:38.185 22524 22567 Error Unity     UnityEngine.Localization.Settings.SystemLocaleSelector
2021/02/17 23:17:38.185 22524 22567 Error Unity     UnityEngine.Localization.Settings.SpecificLocaleSelector
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.LocalizationSettings:SelectLocale()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.LocalizationSettings:GetSelectedLocale()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.PreloadDatabaseOperation`2:BeginPreloading()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Start(ResourceManager, AsyncOperationHandle, DelegateList`1)
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.ResourceManagement.ResourceManager:StartOperation(AsyncOperationBase`1, AsyncOperationHandle)
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.LocalizedDatabase`2:get_PreloadOperation()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.InitializationOperation:PreLoadTables()
2021/02/17 23:17:38.185 22524 22567 Error Unity System.Action`1:Invoke(T)
2021/02/17 23:17:38.185 22524 22567 Error Unity Deleg
2021/02/17 23:17:38.186 22524 22567 Error Unity Can not preload when `LocalizationSettings.SelectedLocale` is null.

And then LocalizationSettings.InitializationOperation.PercentComplete will be 0.2f forever.

Hi, try this Localization works fine in the Player, but not in a compiled build

There’s a bug in addressables, we are waiting for a fix but this Will work around it for now.

Also try turning off code stripping

2 Likes

Tried but no luck. Code stripping is disable and set to low. Changed bundle naming to Append hash to filename.

Still the problem remains, no locales and and localization.

Package Manager shows Addressable 1.16.13, there is newer 1.16.16. Tried updating, after that I cannot build Addressables anymore, Addressables Groups is totally empty.

Delete the locales addressable group and then in the localization settings click the add all for locales.

No luck. Even tried to generate all locales but nothing.

Well, need to discard this and try other tool.

Could you share the full log file with the error?
Also when you re-created the group did you change the name back to Append+Hash?

Names are with Append and hash. Addressables build clean and then build again. Struggling days for now, different Unity versions, different localization versions. It’s sometimes working in player but not in device. Cannot spend anymore time on this, have to be productive.

Are you able to share your project? I can take a look

Sorry but cannot share this project. Already included assets what should not go outside and stripping those will be pain.

Btw, this Does the Localization tool work with PS4? has same errors in log what I saw.

Thanks. Its an Addressables issue that seems to be related to stripping. Ill see if the team have an update.

Does not matter do I have code stripping enabled or not. Tried both ways and in both it cannot find locales.

Is it always the same error?
Can you share the full log file? There may be something important missing before the error message.

Good afternoon, Karl.
I have the same problems, only build WebGL. I would like to help solve the problem.

  • Update to the latest Unity patch version

  • Update to the latest Addressable Assets package in the package manager.

  • Try disabling code stripping

  • Ensure that the Addressable groups are using Append+Hash naming https://discussions.unity.com/t/828258/23

  • Clean and Rebuild Addressables. When Building make sure the Editor is set to the target platform in the Build Settings window.

If the above does not work then please file a bug report.

So the Addressables team believe that this error is caused by building the Addressables for the wrong platform.
When you do the Build make sure that the Editor is set to the target platform in the Build Settings window.

Yes well, it is Android. Build Settings is Android, I can build and run from that window. Also, top menu has Google menu where you can run it too. Still result is same, Locales not found and no localization.

Ok. There’s nothing else I can really suggest now. We would need a bug report to understand what is going wrong

Good morning Karl!
I did what you said:
1.Unity version 2019.4.20f1
2.Localization package version 0.10.0
3. Version of the Addressables package 1.16.16
4. Disabling code stripping does not affect the result
5. Cleaning and building Addressables does not affect the result
6. Changing Bundle Naming does not affect the result

The fact is that when building Addressables and building the application, there are no errors. The error occurs in an already built application. Feeling like unityInstance just doesn’t see the built Addressables.
If it helps, below is a link to a simple project where you can reproduce the error if you build the application. Everything works in the editor, there is localization.
https://drive.google.com/file/d/19qxbMwwHaQNL5xgUiTp9fDAUgwI39Xts/view?usp=sharing

1 Like

Made bug report of this.

1 Like