-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS: Font with family name 'F7A7BDA3-DCC5-40DC-A34F-E487F47EB8C9-ionicons' already loaded #3481
Comments
Hey, @clems36! Thank you for submitting this issue, could you please try creating a Snack that would replicate problem you faced? |
Hey @sjchmiela, async componentDidMount(): Promise<void> {
await Font.loadAsync({
Roboto: require('native-base/Fonts/Roboto.ttf'),
Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
});
this.setState({ fontsAreLoaded: true });
} |
Hey @sjchmiela, any news on this ? |
Don't know if that can help but I've just had a similar issue on a project that does not use expo and I fixed it by simply running |
@clems36 - I don't see this error in the Snack that you linked to, it's unable to load Roboto and Roboto_medium due to how the packager works on Snack but if you remove that then it works as expected. I suspect that the example you provided is not actually a faithful re-creation of what you're experiencing in your app. If you can provide a reproducible example I can help but I'm fairly confident that what you're describing is an issue with your code rather than the tools. Make sure you're only rendering AppLoading while fonts are loading, if you render an Icon component and then try to load that font, it'll load twice. It might be more reliable to provide a link to a Github repository where you can reproduce this since it's closer to your real project than Snack. |
hey @brentvatne I used to load my fonts through Font.loadAsync function like so:-
the custom fonts load perfectly but the fonts loaded first with ...Icon.fontname.font doesn't load and throw this warning:
This issue is only on iOS while works as before on Android. |
By just removing the @expo/vector-icons library and replacing it with the react-native-vector-icons worked fine but why? I have to change every line of code to use the react-native-vector-icons ugh :( |
is that in an expokit project? |
Experiencing this similar issue after upgrading to the SDK 34. Although it's just a warning--it's really annoying. |
@xgenem - provide reproducible example or at least answer the question that was last posted in the thread :P |
No. Mine's not using Expokit. Project was built using Expo though. |
Environment
SDK 31
App target: standalone
"expo": "^31.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.1.tar.gz",
Steps to Reproduce
Load the Ionicons in
Index.js
then
Expected Behavior
On Android the above code does not throw any error and the icons are shown. I would expect iOS to behave the same.
Actual Behavior
I'm getting the following error through Sentry when launching the app on iOS:
The app is still able to run but all the icons are missing.
I had to downgrade because of a bug (unrelated) in sdk 32 and before that, I did not have the above error in sdk 31 and I didn't even have to load the icons in
Index.js
, I was able to use them right away.When switching back to sdk 32, I don't have to load the icons neither.
Thanks!
The text was updated successfully, but these errors were encountered: