expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
34.16k stars 5.47k forks source link

getLocales crashes due to unsupported locale #25693

Closed michaelpomogajko closed 11 months ago

michaelpomogajko commented 11 months ago

Minimal reproducible example

js import { getLocales } from 'expo-localization'; const locales = getLocales(); // crashes on country codes pl_SP & es_419

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

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

expo-bot commented 11 months ago

Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue.

The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue.

A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own.

Resources