-
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
Unable to load fonts when running widget tests #439
Comments
The original issue regards tests (see the README and its links for working test examples). @BetoMottu if you have end users facing this issue, than your app doesn't seem to have the correct permissions. The error includes a link pointing you to resources to properly set your apps' access to the internet. |
@guidezpl, before declaring the problem we check all permissions, as the problem seems to have something to do with connection permission. Our application uses this lib since the beginning of the project a little over 1 year, apparently the problem occurred after the update from version 3.0.1 to 4.0.4, previously we didn't have this problem. Analyzing the issues of this project I found something that is also related to our project, and that could be related to the problem. We used the Poppins font and another report was made with a similar problem: #441 As you can see below, only the source link is available for download, without a link to deal with the problem: We keep getting the error, we are investigating on our side. |
https://fonts.gstatic.com/s/a/9ecfd020e9cc0b676025df8390c0dc8cc2062523540887dd04bec0ef4d5a449c.ttf is a valid link, so please double check permissions, https://docs.flutter.dev/data-and-backend/networking |
Experiencing the same issue, Android specifically
According to Data and Backend > Networking,
We have this included and have had for a while however issue persists. Based on affected users, it affects a handful possibly indicating network connectivity issues. I'd still like to contribute this issue to the discussion. |
@cybex-dev thanks for checking, are there multiple |
None extra other than the 3 standard build variation manifests in <uses-permission android:name="android.permission.INTERNET"/> |
I ended up using the local caching solution by providing desired fonts in the |
That answer isn't quite right, prefer using https://pub.dev/documentation/google_fonts/latest/google_fonts/GoogleFonts/config.html to disallow internet fetching and rely on local fonts only. |
Since we have working unit and widget tests in packages/google_fonts/test, I'm considering this issue unreproducible and will therefore close it. If this changes, or if you have an idea for improving the existing tests to cover your case, please reopen this issue. I've also created #560 as a central place to deal with the font fetching issue. |
Package
google_fonts
Existing issue?
What happened?
Expected vs actual result:
I don't want to include font files in my release bundle, hence only relying in the downloadable nature of the fonts but the test log is getting polluted throwing exceptions that the test failed to load.
Steps to reproduce:
google_font
assets
orgoogle_fonts
Using
google_fonts: 4.0.3
Relevant log output
The text was updated successfully, but these errors were encountered: