Some pages not fully loading when setRequestInterception set to true
See original GitHub issue- Puppeteer version: 1.14.0
- Platform / OS version: Windows 10
- Node.js version: 10.15.3
Complete code to reproduce the problem:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: false,
devtools: false
});
const page = await browser.newPage();
await page.setViewport({ width: 1920, height: 1080 });
await page.setRequestInterception(true);
page.on('request', request => {
request.continue();
});
await page.goto('http://123tvnow.com/watch/cbs/',)
.catch((e) => {console.log(e)})
// await browser.close();
})();
If setRequestInterception
is set to true
, the page never fully loads event thou all requests seem to be handled. Some sub-pages of the included example website do load, like: http://123tvnow.com/watch/espn
If you enable dev tools you’ll need to deactivate breakpoints and resume. It’s just the way site owner coded it.
After 30 seconds a TimeoutError
error will be caught. I would like to understand why this is happening? It is especially confusing because some sub-pages load without a problem so I didn’t expect the xhr
streaming files be an issue or .ttf or something similar.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
node.js - page.setRequestInterceptionEnabled(true) prevents ...
Create a page; Set request interception to true ... Left sidebar with listings does not load when I use page.setRequestInterception(true);.
Read more >Network domain - Chrome DevTools Protocol - GitHub Pages
Response to a requestIntercepted with an authChallenge. Must not be set otherwise. Network.setRequestInterception ExperimentalDeprecated #. Sets the requests to ...
Read more >Page.setRequestInterception() method - Puppeteer
This provides the capability to modify network requests that are made by a page. Once request interception is enabled, every request will stall...
Read more >Web Scraping With a Headless Browser: Puppeteer - ScrapFly
As Puppeteer runs a full web browser, we have access to both CSS selectors ... setContent to set page html to some test...
Read more >Headless Chrome: an answer to server-side rendering JS sites
const browser = await puppeteer.launch({headless: true}); const page = await ... Add basic error handling if loading the page times out.
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 FreeTop 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
Top GitHub Comments
Hello everyone, I faced this issue updating puppeteer 1.12 to 1.15 without update Chrome version (NOT CHROMIUM) and in my case the page never loads and always show a blank page without any error.
To fix this, go to release notes, here you can see the required Chromium version in order to use puppeteer correctly, in this case, you need to update to: Chromium 75.0.3765.0. (puppeteer 1.15)
If you use Google Chrome (not chromium), you will need to wait until Jun 4 for official stable release (v75), or install the version in beta (unstable)
Doesn’t work for me in the stated versions and I let Puppeteer download the version of Chromium automatically.