Request interception causes web fonts pending forever
See original GitHub issueSteps to reproduce
- Puppeteer version: 5.5.0
- Platform / OS version: Windows 10, Ubuntu 18, MacOS Big Sur
- URLs (if applicable):
- Node.js version: 12.19.0
What steps will reproduce the problem?
Example Script: https://github.com/mstr-pezhang/puppeteer-issue/blob/36cddcc721ec0cf228f213f72dce2addcd5e223d/test/webfont.spec.ts
- Create a font-face like https://github.com/mstr-pezhang/puppeteer-issue/blob/36cddcc721ec0cf228f213f72dce2addcd5e223d/static/global.css
- In the webpage, do not directly use the web font, but generate a DOM node to use it. https://github.com/mstr-pezhang/puppeteer-issue/blob/36cddcc721ec0cf228f213f72dce2addcd5e223d/static/add-text.js
- Enable request interception. For each request, simply call
request.continue();. - Open DevTools and go to Network tab.
- See that the font cannot be correctly rendered because the URL is pending forever.
What is the expected result? The web font can be successfully loaded and rendered.
What happens instead? The default system font is used instead, while the web font is pending forever. https://github.com/mstr-pezhang/puppeteer-issue/actions/runs/443832997
I’m not sure if it is a Chromium issue, but there are similar issues like #4208 and #5003
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
623616 - DevTools: [network] unused webfonts are shown ...
I verified that the problem occurs even when we have the appropriate fonts exist on the server. ... Steps to reproduce: (1) Connect...
Read more >Chrome fonts always pending - css
We have about 30 fonts that are pending, mostly from Google but many from our own CDN. This is only occurring in Chrome...
Read more >A proposal for creating an API to register and enqueue web fonts
Most APIs provide CSS for their webfonts. Registering a webfont in this manner is easy as we can simply call wp_enqueue_webfont( $handle, $url...
Read more >chrome requests get stuck pending [closed] - nginx
If it's stuck waiting for the end of the content, it means the web server fully received and processed the request, you should...
Read more >How to Fix Slow Page Loading Waiting for fonts.googleapis ...
Frustrated with slow web page loading with Google Fonts? ... This is the reason for the page getting stuck up in a browser...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@benallfree probably that could help:
I had similar issue with Font request pending for more than 30sec (I had timeout 35s). After upgrade on 13.0.0 this issue is completely gone
In our project we are setting request interception on as right after calling
newPage()and before opening any pages but we are still having this problem.