-
Notifications
You must be signed in to change notification settings - Fork 158
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
'Failed to load font' error #560
Comments
The problem is that despite "catchError" an error is logged in the Firebase console. For example: GoogleFonts.pendingFonts([
GoogleFonts.soraTextTheme(),
]).then((value){
debugPrint("[Theme][fetchFonts] all font fetched!");
}, onError: (e)async{
debugPrint("[Theme][fetchFonts] error: $e");
}).catchError((e){
debugPrint("[Theme][fetchFonts] catchError: $e");
});```
|
This comment was marked as spam.
This comment was marked as spam.
Any fix for this? |
Any Fix to this ? its been long since the issue is opened |
Also seeing thousands of these errors thrown in sentry. Please fix |
read the "solution" part of the OP's comment |
The solutions listed there only help those who have no idea what has caused the errors. In my case, I already know why they are thrown. Excerpt from the README:
I wouldn't choose HTTP fetching if the document strongly recommended we avoid it, or if fetching should never fail. However, it is clearly stated that it can be used in production, and I think everyone knows that fetching fails if there is no Internet connection or the servers are down. "To reduce app size" is a very common reason we choose it over bundling if the app is not offline-first. I (and probably some others here) have opted in to use HTTP fetching, already knowing connection errors sometimes occur. In that case, thousands of error logs appearing in an error monitoring tool are just a noise. It is possible to mark those logs as "closed" on Crashlytics to make them hidden, but I've heard that having a large number of errors affects the visibility of the app in the Play Store. (I'm not sure about the App Store and whether errors marked as closed still have a negative impact in the same way.) Shouldn't there be a way to mute such logs on the app side? Or should I manually check the error message to exclude this particular error from the logs sent to Crashlytics? |
Package
google_fonts
Description
If you ran into this error, it means that an attempt was made to fetch a font TTF file from Google Fonts' servers, but failed. For example:
Solution
The most common reason is the device/emulator/simulator doesn't have internet access.
Background
The default behavior for this package is to fetch (and cache) fonts from the Internet at runtime. Including chosen fonts at build time is also supported, instructions for doing this are in the README.
Still need help?
If you ran into this issue and have eliminated all possible causes listed above, please comment with all relevant information (Wi-Fi / mobile network, target device & OS,
flutter version -v
, etc.)The text was updated successfully, but these errors were encountered: