Open Abayomzee opened 1 month ago
Having the same issue
This was a life saver. I also have this problem. Came when updating to expo 51
Able to reproduce here. I should note that I believe this is some kind of fault with RN, iOS or the font file itself as:
Curious if the crashes I'm seeing is related to this. As above not using Inter_600SemiBold prevents these crashes from occurring.
@Gnative GNative Thanks for that post. I had the font issue, which I resolved by removing that 1 font, but I'm still getting the EXEC_BAD_ACCESS errors and have no idea why. I now understand it is part of the font issue. Thank you.
I might experience a similar problem (same stack trace). However, I don't use Inter_600SemiBold or any Google Fonts at all – instead, I use custom TTF fonts via expo-fonts useFont
hook (specifically Cute Dino and Reddit Mono Regular):
const [fontsLoaded] = useFonts({
'Cute-Dino': require('./assets/fonts/Cute-Dino.ttf'),
'RedditMono-Regular': require('./assets/fonts/RedditMono-Regular.ttf'),
});
I can't sustainably reproduce the crash, unfortunately. It sometimes occurs when navigating to some screen that includes one of the fonts. I'm still unsure which one is the exact culprit – somehow the stack trace includes "[H]elvetica Oblique", even though I don't make use of that font at all:
@alanjhughes I'm still receiving a crash along with a similar stack trace above. I know you merged this fix and have shared my input on this thread, but I am still seeing this with the fix on Expo 51. Downgrading to Expo 50 seems to resolve the issue. This issue is keeping me from upgrading. Do you have any ideas?
@iM-GeeKy I'll need a minimal example that demonstrates the crash so I can debug it. I've tested against the font mentioned in this issue and I'm not seeing any problems.
I might experience a similar problem (same stack trace). However, I don't use Inter_600SemiBold or any Google Fonts at all – instead, I use custom TTF fonts via expo-fonts
useFont
hook (specifically Cute Dino and Reddit Mono Regular):const [fontsLoaded] = useFonts({ 'Cute-Dino': require('./assets/fonts/Cute-Dino.ttf'), 'RedditMono-Regular': require('./assets/fonts/RedditMono-Regular.ttf'), });
I can't sustainably reproduce the crash, unfortunately. It sometimes occurs when navigating to some screen that includes one of the fonts. I'm still unsure which one is the exact culprit – somehow the stack trace includes "[H]elvetica Oblique", even though I don't make use of that font at all:
Stack Trace
Did you ever resolve this? I'm having the exact same issue!
I have the same issue, but unfortunately can't reliably reproduce the problem. It is intermittent.
I might experience a similar problem (same stack trace). However, I don't use Inter_600SemiBold or any Google Fonts at all – instead, I use custom TTF fonts via expo-fonts
useFont
hook (specifically Cute Dino and Reddit Mono Regular):const [fontsLoaded] = useFonts({ 'Cute-Dino': require('./assets/fonts/Cute-Dino.ttf'), 'RedditMono-Regular': require('./assets/fonts/RedditMono-Regular.ttf'), });
I can't sustainably reproduce the crash, unfortunately. It sometimes occurs when navigating to some screen that includes one of the fonts. I'm still unsure which one is the exact culprit – somehow the stack trace includes "[H]elvetica Oblique", even though I don't make use of that font at all: Stack Trace
Did you ever resolve this? I'm having the exact same issue!
Shortly after posting my comment above, I noticed that in the issue in the expo main repo it was discussed that expo-font 12.0.7 fixes this issue. For my specific problem, this seems to be the case: I've upgraded to expo-font@12.0.7 and expo@51.0.12 and the crash hasn't occurred again since then.
I was on expo-font@12.0.5 before.
I might experience a similar problem (same stack trace). However, I don't use Inter_600SemiBold or any Google Fonts at all – instead, I use custom TTF fonts via expo-fonts
useFont
hook (specifically Cute Dino and Reddit Mono Regular):const [fontsLoaded] = useFonts({ 'Cute-Dino': require('./assets/fonts/Cute-Dino.ttf'), 'RedditMono-Regular': require('./assets/fonts/RedditMono-Regular.ttf'), });
I can't sustainably reproduce the crash, unfortunately. It sometimes occurs when navigating to some screen that includes one of the fonts. I'm still unsure which one is the exact culprit – somehow the stack trace includes "[H]elvetica Oblique", even though I don't make use of that font at all: Stack Trace
Did you ever resolve this? I'm having the exact same issue!
Shortly after posting my comment above, I noticed that in the issue in the expo main repo it was discussed that expo-font 12.0.7 fixes this issue. For my specific problem, this seems to be the case: I've upgraded to expo-font@12.0.7 and expo@51.0.12 and the crash hasn't occurred again since then.
I was on expo-font@12.0.5 before.
I'm currently on
"expo": "^51.0.12",
"expo-font": "~12.0.7"
did a new build and have confirmed it has the fix code along, but am still seeing the issue.
I actually removed all custom fonts in our project including the expo-font
+ expo-google-font
dependencies and still hit this in Expo Go + the simulator. Annoyingly I don't think I can share our codebase but will try and spin up another project + recreate. Like others ours is intermittent so difficult to pin down but does seem to be specific to iOS.
Prior to removing those deps I also updated to expo-font
12.0.7 and it made no difference.
I'm now convinced its something to do with moving to Expo 51. Our first crash in Prod directly correlates to the day we updated to Expo 51
@gm90 to clarify, you're saying you have removed expo-font
and are still seeing the crash?
Yes exactly that. I tried a few other things first:
expo-google-fonts
(pruning the dependency in the process) and embedded them in the assets directory with the necessary app.json
confignpm prune
so would expect it to be gone)I also tried to downgrade to Expo 50 but on iOS its a bit of a problem because of:
So that sort of blocks device testing. Then when I looked at the dates we moved to 51 it seemed pretty coincidental.
At that point I assumed maybe Expo has something internally that maybe causing it. I.e. within the dev tools etc?
@gm90 none of your changes will effect expo go. If you want to remove some of the included dependencies ie expo-font you'll need to use a dev build. Same thing when loading the fonts through the plugin. That won't work in expo go.
@gm90 none of your changes will effect expo go. If you want to remove some of the included dependencies ie expo-font you'll need to use a dev build. Same thing when loading the fonts through the plugin. That won't work in expo go.
I'm seeing similar behavior, but I'm using development builds. Expo 50 seems to work, but upgrading to 51 seems to bring about the issues. I'd be happy to hop on discord or something and show you the crash if that makes it easier (I haven't managed to reproduce it locally yet, but I can consistently get it to crash in my main project).
@gm90 none of your changes will effect expo go. If you want to remove some of the included dependencies ie expo-font you'll need to use a dev build. Same thing when loading the fonts through the plugin. That won't work in expo go.
I'm not quite sure what you mean by none of the changes would affect Expo Go? As I was making these changes I was definitely noticing the changes of fonts from one to another etc in Expo Go, and ultimately the removal of the font, effectively causing the app to use what I thought to be the OS default.
Are you saying by removing them from package.json
+ npm pruning those dependencies aren't removed? That seems a bit weird, that suggests they are automatically included regardless of whether they are in the package.json
or not. I'm not trying to argue otherwise, I'm just genuinely curious as to how that all works + appreciate the assistance.
In the end I was also doing development builds in an effort to try and Symbolicate the crash reports but I can't honestly say I then ran one of those (it had been a long few days).
Are you saying by removing them from package.json + npm pruning those dependencies aren't removed?
@gm90 Yes, you cannot remove the native code from expo go. Also config plugins will not have an effect on it. You can remove the JavaScript but that's all. expo-font
will still be part of expo go regardless of what you do to your package.json. Expo go is a prebuilt sandbox. Meant for getting started quickly and learning. It's not meant for developing any real project in.
@gm90 to clarify, you're saying you have removed
expo-font
and are still seeing the crash?
@alanjhughes I also removed "expo-font": "~12.0.7"
as well as any references to the custom font I was using, which in this case was "@expo-google-fonts/nunito": "^0.2.3"
and still get the crash. I still see the same error
Thread 10 Crashed:: Dispatch queue: com.facebook.react.ShadowQueue
0 CoreFoundation 0x18040fa60 CF_IS_OBJC + 20
1 CoreFoundation 0x180437a90 CFStringGetLength + 128
2 CoreFoundation 0x180440db4 CFStringFind + 56
3 Bluebirding 0x101e48f14 weightOfFont(UIFont*) + 400
4 Bluebirding 0x101e48790 +[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:] + 2740
5 Bluebirding 0x101bda504 -[RCTTextAttributes effectiveFont] + 228
6 Bluebirding 0x101bd9d1c -[RCTTextAttributes effectiveTextAttributes] + 68
7 Bluebirding 0x101bd3520 -[RCTBaseTextShadowView attributedTextWithBaseTextAttributes:] + 924
8 Bluebirding 0x101bddfa4 -[RCTTextShadowView attributedTextWithMeasuredAttachmentsThatFitSize:] + 156
9 Bluebirding 0x101bde620 -[RCTTextShadowView textStorageAndLayoutManagerThatFitsSize:exclusiveOwnership:] + 604
10 Bluebirding 0x101bdc850 RCTTextShadowViewMeasure(YGNode const*, float, YGMeasureMode, float, YGMeasureMode) + 212
...
and sentry seems to capture the error
EXC_BAD_ACCESS
elvetica Oblique >
Attempted to dereference null pointer.
@gm90 I was sort of able to reproduce the example in another project and was wondering if you could try the same. I know this sound super crazy, but if I first caused the crash in my main project (in this case the codebase you cannot share). Then kill everything and start your reproducible example app and see if you get the same error. I realize that sounds bizarre and I've never seen anything like it, but that's the best I've managed to come up with 🤷🏼♂️. I'm not sure this is much help for @alanjhughes . This only seems to be present on Expo 51. Reverting to Expo 50 fixes the issue.
https://github.com/expo/google-fonts/assets/7604441/d8e247e0-66ac-44f5-8e1e-d357e22dd4f6
I have been trying to reverse engineer a little bit why this might be happening. I don't know if this is useful but I noticed that in my case ALL of the fonts loaded by expo icons library lack font names. Family is loaded and recognised but has no names. And for the font used by the app, Nunito, only one of the 6 loaded names remains
However, when the app is first started all font names can be properly found. They still exists after the first navigation but then suddenly can no longer be found.
Has a solution been identified? We’re also seeing this on iOS after upgrading to Expo 51 and have rolled back to Expo 50 until this is resolved.
@gm90 I was sort of able to reproduce the example in another project and was wondering if you could try the same. I know this sound super crazy, but if I first caused the crash in my main project (in this case the codebase you cannot share). Then kill everything and start your reproducible example app and see if you get the same error. I realize that sounds bizarre and I've never seen anything like it, but that's the best I've managed to come up with 🤷🏼♂️. I'm not sure this is much help for @alanjhughes . This only seems to be present on Expo 51. Reverting to Expo 50 fixes the issue.
Screen.Recording.2024-06-22.at.1.07.58.PM.mov
Wasn't able to reproduce what your seeing here, but still getting the error on our existing repo. Hopefully what @Njaah-0 has found may point us in the right direction as I'm struggling to find anything concrete. We've got a spike with Sentry lined up so may try and bring that forward and see if it sheds any more light
@alanjhughes @brentvatne, we’re seeing the same behavior after upgrading our app to Expo 51. We’ve reverted back to Expo 50 for the time being. Do you have any insights into this?
I'm still seeing this after updating to "expo": "^51.0.18",
and it's associated latest dependencies. @gm90, @Njaah-0 is this still an issue for you?
I've started looking into this again. Can anyone provide a reliable repro? I cannot reproduce in a clean development build. Here is a screenshot with all the inter fonts loaded.
Its definitely still an issue for us, but not specific to this font. I began work trying to strip down our repo so it could be shared as couldn't reproduce on a clean development build, but theres a fair amount of work removing everything 😢 . The majority of times I've seen it is when I switch screens (even to screens that I'd visited previously without a crash, so feel like something is going on just as layout changes). We are getting more and more crash reports in Prod though.
@gm90 - can you identify what you remove that stops it breaking?
I’m seeing the exact same symptoms as @gm90. @alanjhughes I messaged you on Discord. I can’t share my code base but I’d be happy to screen share with you to show you what is going on, if that may help give you an idea of what we’re seeing.
I've not been able to stop it. A couple of times I thought I'd hit on something as I didn't witness it as regularly as I have had and then all of a sudden it'll pop back up.
@alanjhughes and @iM-GeeKy, we're seeing the same problem @gm90 is describing after moving to Expo 51. The stack trace indicates a weightOfFont(UIFont*) + 400 error, but it seems to crashing when switching screens/tabs. For the time being, we have rolled back to Expo 50.
@alanjhughes and @iM-GeeKy, we're seeing the same problem @gm90 is describing after moving to Expo 51. The stack trace indicates a weightOfFont(UIFont*) + 400 error, but it seems to crashing when switching screens/tabs. For the time being, we have rolled back to Expo 50.
Facing the same issue.
@alanjhughes As mentioned earlier, I'm happy to screen share the issue with you since I can't share my code base. I know it's not the conventional way, but it seems a number of people are experiencing the issue, but recreating a reproducible example is appearing to be difficult. Just let me know, I'm here to help however I can.
@alanjhughes and @iM-GeeKy, we're seeing the same problem @gm90 is describing after moving to Expo 51. The stack trace indicates a weightOfFont(UIFont*) + 400 error, but it seems to crashing when switching screens/tabs. For the time being, we have rolled back to Expo 50.
Our team is facing this issue as well.
My app crashes on ios whenever I navigate to a route that makes use of Inter_600SemiBold.