next/font/google download timeout should be configurable #47009
Replies: 15 comments 2 replies
-
@hanneslund 👋 do you think this have any merit? |
Beta Was this translation helpful? Give feedback.
-
Hi dear @hanneslund The current The suggested configurable timeout would be great for DX, especially for those who develop apps in CJK languages. Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue with a regular Latin font with just two font weights, and no particular network issue: the request times out and fails. I'm not sure if making it configurable is the best solution, but at least a longer timeout could be used. Perhaps PR #51890 solves the issue. |
Beta Was this translation helpful? Give feedback.
-
Same issue and production build fails because of it.... is this on the roadmap for "fix" anytime soon otherwise use of next/font is useless for our projects |
Beta Was this translation helpful? Give feedback.
-
I am facing this issue when downloading google fonts, there should be an option to increase/set the timeout when downloading google fonts in next/font |
Beta Was this translation helpful? Give feedback.
-
Going to go back to manual script references... this package is garbage |
Beta Was this translation helpful? Give feedback.
-
@styfle @timneutkens @berlysia following your contributions to the font package (#58075 and others to retry fetching), any chance to have a configurable timeout? In my case the provider build environment I have always fails to fetch the font within the default timeout (it's a known issue, with people behind VPN...). Thank you, |
Beta Was this translation helpful? Give feedback.
-
Facing this similar issue. following |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Facing this issue as well, we have CI/CD builds fail pretty consistently due to this. Following. |
Beta Was this translation helpful? Give feedback.
-
So this is still happening with github actions. I have to run many times the jobs. I'm not behind a VPN... |
Beta Was this translation helpful? Give feedback.
-
Running into this issue as well while using Digital Ocean App services. I have to run the CI/CD at least 10 - 15 times... |
Beta Was this translation helpful? Give feedback.
-
It seems common in GitHub Actions when building arm64 images which require emulation. It's consumes a lot of resources so takes longer to perform actions like this, which then times out regularly. |
Beta Was this translation helpful? Give feedback.
-
Our use case is for a multilingual site where we consume 20+ Google fonts. The 3000ms timeout means that 9/10 development runs and 9/10 production builds fails rendering |
Beta Was this translation helpful? Give feedback.
-
Just to pile on I'm observing a fun behavior in docker where after 3 seconds it fails for all 3 retries instantly. This also occurs 100% of the time if you use a large font such as Simplified Chinese (which our app requires and is a 17MB TTF file) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
In Next.js release v13.2.4 a timeout for the process of downloading fonts from Google Fonts was merged in #46834 for development environments. While the idea seems solid, when the network is flaky, congested, or otherwise crappy, this timeout fires too soon and fonts can't be downloaded (in fact, this has happened to me twice already.)
Proposal
The value for the timeout should be configurable, while keeping the chosen 3000 milliseconds as default. Honestly, I have no idea if the override should be set via environment variables or in
next.config.js
.Beta Was this translation helpful? Give feedback.
All reactions