Skip to content
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

Some pages not fully loading when setRequestInterception set to true #4442

Closed
vincenthawke opened this issue May 17, 2019 · 10 comments · Fixed by #4516
Closed

Some pages not fully loading when setRequestInterception set to true #4442

vincenthawke opened this issue May 17, 2019 · 10 comments · Fixed by #4516
Labels
bug chromium Issues with Puppeteer-Chromium upstream

Comments

@vincenthawke
Copy link

vincenthawke commented May 17, 2019

  • 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.

@snyamathi
Copy link

I've noticed this issue as well - removing the request interception allows test to proceed which would otherwise timeout. In my case, I have the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD flag set and am using Chrome on my machine ( v74 ) but noticed that with Canary ( v76 ) the issue is no longer present and the requests go through as usual.

@jazoom
Copy link

jazoom commented May 21, 2019

I saw this with 1.15.0 and am now seeing it with 1.16.0.

@Yokutto
Copy link

Yokutto commented May 27, 2019

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)

@dvil88
Copy link

dvil88 commented May 27, 2019

Version 1.14 is last one that this is working. According to issue #3118 args: ['--enable-features=NetworkService'], has to be added, well... no, it's still not working.
Tried in puppeteer v1.8-v1.17 with chromium version 73.0.3683.86 (i'm using my own chromium instead of using the one downloaded by puppeteer) and it only works in versions <1.15

@Yokutto
Copy link

Yokutto commented May 27, 2019

It's because puppeteer 1.15 requires chrome v75+

@dvil88, please read my comment and you will understand

@dvil88
Copy link

dvil88 commented May 27, 2019

@Yokutto yup, I read it after writing my comment lol. I was using my own chrome because of the policy settings but now I've managed to add the settings to the chrome opened by puppeteer so I can work with that version.

@jazoom
Copy link

jazoom commented May 27, 2019

Doesn't work for me in the stated versions and I let Puppeteer download the version of Chromium automatically.

@aslushnikov aslushnikov added bug chromium Issues with Puppeteer-Chromium upstream labels Jun 1, 2019
@aslushnikov
Copy link
Contributor

@vincenthawke Thank you for filing this! ❤️

Fix has landed upstream with https://chromium-review.googlesource.com/c/chromium/src/+/1636684
Fix will be rolled in with the upcoming Chromium roll.

aslushnikov added a commit to aslushnikov/puppeteer that referenced this issue Jun 3, 2019
This roll includes:
- https://crrev.com/665226 - DevTools: make interception respect cross-process frame boundaries

This fixes page loading with dynamic OOPIFs - test is added.

Fix puppeteer#4442
aslushnikov added a commit that referenced this issue Jun 4, 2019
* feat(chromium): roll Chromium to r665405

This roll includes:
- https://crrev.com/665226 - DevTools: make interception respect cross-process frame boundaries

This fixes page loading with dynamic OOPIFs - test is added.

Fix #4442

* fix lint
@el0911
Copy link

el0911 commented Apr 28, 2020

I've noticed this issue as well - removing the request interception allows test to proceed which would otherwise timeout. In my case, I have the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD flag set and am using Chrome on my machine ( v74 ) but noticed that with Canary ( v76 ) the issue is no longer present and the requests go through as usual.

can u explain this?

@snyamathi
Copy link

It's been a while, so I don't remember exactly - but I believe there was some sort of issue with chrome 74 that was fixed with chrome 76 which prevented request interception from working properly. Since then, I haven't seen issues and am using request interception without issue - though we've long since passed those two chrome versions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug chromium Issues with Puppeteer-Chromium upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants