question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

load never fires when setting setRequestInterceptionEnabled to true (and disable JS)

See original GitHub issue

https://github.com/GoogleChrome/puppeteer/pull/565 fixed most cases I found with pages never reporting the load event in puppeteer, but I have here found another url that breaks in the same way - only after calling setRequestInterceptionEnabled(true).

Environment

Puppeteer: 0.11.0 Node: 7.10.1. OS: macOS Sierra

Reduced test case (updated)

Js disabled + request interception => never loads

This is the real problem that relates to this issue. Originally when I posted I missed the critical detail that JS needs to be disabled for the load to never happen:

const puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch({
      ignoreHTTPSErrors: true,
      args: ['--disable-setuid-sandbox', '--no-sandbox']
    })
const page = await browser.newPage()

await page.setJavaScriptEnabled(false)
await page.setRequestInterceptionEnabled(true)
page.on('request', intercepted => intercepted.continue())

await page.goto('https://apartmentsdoralfl.com/')
console.log('page load DONE') // never happens
browser.close();
})();

**NOTE that the url I’m using in this test case it not the one I had when I originally raised the issue - the original url now works (and along with it about 80% of the problematic url’s I had) - but the one listed here does not.


Thanks for all the hard work on puppeteer, it’s shaping up for me to be able to launch a new major version of Penthouse with it replacing phantomjs. 👍

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
addyosmanicommented, Sep 14, 2017

@aslushnikov Thanks for taking a look 👋 If it helps at all with prioritization, @pocketjoso’s work to use Puppeteer in Penthouse is important for the ecosystem as tools like critical are relying on it for a shift over to Chrome headless.

2reactions
aslushnikovcommented, Sep 9, 2017

@pocketjoso ok thanks, I can repro now, will take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Puppeteer wait for all images to load then take screenshot
There is a built-in option for that: await page.goto('https://www.digg.com/', {"waitUntil" : "networkidle0"});.
Read more >
Diff - 7114a66134..b6ba996636 - chromium/src - Git at Google
bool AreRemoteSuggestionsEnabled() const; - // Returns true if the remote provider is managed by an adminstrator's policy. - bool AreRemoteSuggestionsManaged() ...
Read more >
types/puppeteer/index.d.ts - UNPKG
72, type LiteralUnion<LiteralType> = LiteralType | (string & { _?: never | undefined }); ... Use 'module' in order to load a Javascript...
Read more >
cdp - Go Packages - The Go Programming Language
Enable must be called before events are triggered for the domain: ... target discovery for the specified locations, when setDiscoverTargets was set to...
Read more >
How to Enable / Disable Javascript in Google Chrome
Learn how to enable and disable Javascript in Google Chrome. Javascript can be enabled and disabled globally or for individual websites.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found