New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
After Upgrade to SDK 33: undefined is not an object (evaluating '_expo Localization.Localization.locale') #5735
Comments
Did you run |
I also experiencing this error. When is this on the pipeline to be fixed? |
How do you import |
As you stated above. Might be usefull while debuggingIt all happened after upgrading to xcode 13 |
Hi @slauzinho, |
I can confirm that this bug only happens in iOS 13 simulator and in iOS 12.2 simulator everything works fine. Plus, this bug affects not only SDK 33, but also 34 and 35. In SDK 34 app crashes in this line https://github.com/expo/expo/blob/master/packages/expo-localization/build/Localization.js#L4 |
@kevinvugts you can install iOS 12.2 in your new Xcode 13 and use its Simulator to continue your work today. |
Just to be clear. You guys mean Xcode 11 right? I guess you are confusing it with iOS 13. |
Sure. Already did that. @andersravn I mean xCode 11 right. Sorry for the misconception |
Yes I did, and I tried both iOS 13 and iOS 12.4.1 also not working. |
I've created PR which may fix it. However, it will be nice if you go to |
Yes, we do. Sorry, I was confused with first message about it. |
It helps. After updating region all future app starts, even if you kill the simulator, don't crash. |
Hi thanks! But sorry it still does not work for me, I tried both on my iphones iOS 12.4.1 & iOS13, and iOS 12.2 simulator on Xcode, all still got the same error. |
Would there be any hot fixes for iphone testing directly as well? Many thanks! |
Hi @tinyGoldfish, could you check if this bug occurred in iOS 13.1? |
@lukmccall there is no iOS 13.1 in Xcode 11, at least for now, but I tried to run our app in Expo app on my iPhone with iOS 13.1 and everything works fine. Also, as I understood, the bug happens only in iOS 13 Simulator. |
not in standalone or Expo-client app |
@serhiipalash , it happens on our side too. Both - in simulator and Expo-client (on a real device). iOS 13.0. However, iOS 12 - all good. Happens right after when you install the latest Expo-client on the simulator. As soon as my code reaches this point: |
@superKalo I've read your post and I don't see how it is related to this issue. This issue is about |
Sorry, I shared wrong issue. Please see my updated comment above. |
Hi @lukmccall , thanks for the follow up, just tried again with the iOS 13.1 on my iphone, it's not working on my project neither...got the same error. |
@lukmccall do you think this issue happens on iOS simulator (iOS v13.0) only? I tried to publish same app (which displays this error) on a different release channel and I opened it on a real device (iPhone, iOS v13.0) via Expo-client. It works just fine. I wonder if this error will appear on the standalone app, if I decide to update. |
As per my understanding the problem is that if the phone (either device or simulator) has the default language because the user didn't set it, all the language properties like timezone, country, currency and so on are undefined raising the exception |
@superKalo I think @bit-scrambler is right. This bug can occur not only in simulators. For now, I've added a fallback value to |
@lukmccall do you mean that |
@serhiipalash, I was talking only about |
@lukmccall thanks for explanation, I just want to be sure that at least |
@serhiipalashu unfortunately, To sum everything up, For now, we should wait for a system patch. |
I am using localization only for I18nManager. Below you can find the code. The above issue is only coming for iPhone pro 11 max and the other version before this are working fine.
|
Can anyone confirm that this is NOT happening in production apps? |
@holgersindbaek I have an app in production and so far we have no problems with any of the iOS 13 devices. |
# Why Resolve #5735. # How Wrapped `region` variable into UMNullIfNil macro, because `[[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]` could return nil on iOS simulator.
In your simulator go to settings > General > Language & Region and pick the United State as a region ...... If your region is already US, you have to click again in united States and Update |
Just got this on sdk 35 in the simulator, but after uograding to 36 it seems to be fixed 馃憣 |
@tsapeta Tomasz, won't this fix be backported to SDK 33, since it's still a supported SDK? Just upgraded my XCode and I see the crash on my simulator. Also, can the expo team confirm this won't affect real devices, only the simulator? |
worked for me, here's what needs to be done: https://docs.expo.io/versions/latest/sdk/svg/ |
I still experience the problem here when I start a simulator for the first time without setting the region on the iPhone preferences. If the problem happen only on the Simulator it's not such a big deal as the solution is to set the region in the simulator preferences (even if a fix will be appreciated). Is it possible to check if |
@sarcadass, #8193 should fix it ;) |
So, hum hum, SDK 40, just as simple as that with real iOS device: import * as Localization from 'expo-localization';
console.log({ Localization }); throws : And no, I didn't opened "Settings > General > Language & Region" because I do not expect my app users to do so on their side, it would be ugly to mention anything like that to anyone. |
@DamianBarrionuevo I had the same problem on Android 11. The problem was that I forgot to rerun expo run:android after installing expo-localization. |
馃悰 Bug Report
Hello,
after Upgrading to SDK 33 I got the following error: "undefined is not an object (evaluating '_expo2.default.registerRootComponent), but before upgrade everything was fine. I got the below errors,
it first popped up this error:
then 3 seconds later changed to this:
Environment
Expo CLI 3.1.0 environment info:
System:
OS: macOS 10.14.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.17.0 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
expo: ^33.0.0 => 33.0.7
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8
react-navigation: ^3.11.0 => 3.12.1
npmGlobalPackages:
expo-cli: 3.1.0
app's target: iOS
I just started learning Expo, please let me know if I need to provide more details.
Thanks very much,
SK
The text was updated successfully, but these errors were encountered: