Search Issue Tracker

Won't Fix

Won't Fix in 1.0.X

Votes

0

Found in [Package]

1.0.1

Issue ID

LOC-425

Regression

No

[Localization] LocalizationSettings.GetSelectedLocale() throws errors when Locale could not be selected

Package: Localization

-

How to reproduce:
1. Open the provided project ("UnityBugLocalization.zip")
2. Build And Run

Expected result: No errors thrown in development console, LocalizationSettings.GetSelectedLocale() returns null.
Actual result: Errors thrown in the development console, LocalizationSettings.GetSelectedLocale() does not return null.

Reproducible with: 0.10.0-preview, 1.0.1 (2019.4.30f1, 2020.3.19f1, 2021.1.22f1, 2021.2.0b13, 2022.1.0a9)

Note:
- Reproducible on Windows, macOS

Errors:
System.Exception: Invalid path in TextDataProvider : /StreamingAssets/aa/settings.json'.
RuntimeData is null. Please ensure you have built the correct Player Content.
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]].
UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Locale, Type=UnityEngine.Localization.Locale
OperationException : ChainOperation failed because dependent operation failed
UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Locale, Type=UnityEngine.Localization.Locale
No Locale could be selected:
No Locales were available. Did you build the Addressables?
The following (3) IStartupLocaleSelectors were used:
UnityEngine.Localization.Settings.CommandLineLocaleSelector
UnityEngine.Localization.Settings.SystemLocaleSelector
UnityEngine.Localization.Settings.SpecificLocaleSelector

  1. Resolution Note:

    This will not be fixed

  2. Resolution Note (1.0.X):

    The exception is a symptom of some other bugs that have been fixed in 1.0.0.
    Further discussion can be found at https://forum.unity.com/threads/case-1368143-localizationsettings-getselectedlocale-causes-nullreferenceexception.1173899/

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.