You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is occurring because getLocales() is passing the results of getNavigatorLocales() directly into Intl.Locale() and not guarding against the exceptions that could be thrown as a result.
This means, for example, having "en-GB-oed" in your Accept-Language header eventually results in a RangeError being thrown that, uncaught, could make an entire app unusable.
So, in addition to failing on legitimately invalid language tags (as with the given pl-SP), it will also fail on valid language tags that are not supported by Intl.
Minimal reproducible example
https://snack.expo.dev/3e1UB5xwZ
Summary
Call to function 'ExpoLocalization.getLocales' has been rejected.
→ Caused by: java.lang.IllegalArgumentException: Unsupported ISO 3166 country: pl_SP
Also saw the same issue with following country code es_419
Snack can't reproduce the issue due to not able to change locales of device
Environment
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.2.1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/Library/Caches/fnm_multishells/90040_1701414843416/bin/node
Yarn: 1.22.21 - ~/Library/Caches/fnm_multishells/90040_1701414843416/bin/yarn
npm: 10.2.4 - ~/Library/Caches/fnm_multishells/90040_1701414843416/bin/npm
Watchman: 2023.11.20.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.14.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.11090377
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
npmPackages:
expo: ~48.0.21 => 48.0.21
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.71.14 => 0.71.14
react-native-web: ~0.18.12 => 0.18.12
npmGlobalPackages:
eas-cli: 5.9.1
Expo Workflow: bare
The text was updated successfully, but these errors were encountered: