New issue
Advanced search Search tips

Issue 909616 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 705916



Sign in to add a comment

TimeoutError on new version of headless chrome while using networkidle0 option despite no active requests

Reported by ziga.str...@gmail.com, Nov 28

Issue description

Chrome Version       : 72.0.3582.0 headless
Other browsers tested:
  FAIL 72.0.3582.0
  OK   71.0.3563.0

What steps will reproduce the problem?
I'm using puppeteer as an API for headless Google Chrome and I'm trying to make a screenshot of a page which is supposed to show a chart which I later include in the email report intended for our leadership. I'm using networkidle0 as a waitUntil option since I need to wait for AJAX request to finish. That request is bringing in the data necessary to plot the chart. 

This is the code 

// START OF CODE
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();

await page.authenticate({
    username: process.env.BASIC_AUTH_USERNAME,
    password: process.env.BASIC_AUTH_PASSWORD
});

const q = JSON.stringify(query)

await page.goto(`${process.env.APP_URL}/screenshot?graph=${chart}&type=${type}&q=${q}`, {
     waitUntil: 'networkidle0',
});

await page.screenshot({path: `./storage/app/public/screenshots/${path}.png`});

await browser.close();
// END OF CODE

What is the expected result?
The expected result should be an image stored on the internal drive with the path provided as the parameter of page.screenshot.

What happens instead?

I'm getting a TimeoutError exception (will include trace below) with the default setting of 30 seconds. SO I implemented InflightRequest tracker class which would print all the requests not being done yet in the catch clause (not in the code provided above) but the array is empty so none of the URLs are being printed out. I've tested the code with 300ms timeout limit and the requests were being printed out so that one worked. The code for this I've found as a comment available here (https://github.com/GoogleChrome/puppeteer/issues/1908#issuecomment-380308269).

// START OF TRACE
screenshot_1  |  { TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
screenshot_1  |  at Promise.then (/var/www/node_modules/puppeteer/lib/FrameManager.js:1230:21)
screenshot_1  |  at <anonymous>
screenshot_1  |  -- ASYNC --
screenshot_1  |  at Frame.<anonymous> (/var/www/node_modules/puppeteer/lib/helper.js:144:27)
screenshot_1  |  at Page.goto (/var/www/node_modules/puppeteer/lib/Page.js:587:49)
screenshot_1  |  at Page.<anonymous> (/var/www/node_modules/puppeteer/lib/helper.js:145:23)
screenshot_1  |  at /var/www/screenshot.js:18:24
screenshot_1  |  at <anonymous>
screenshot_1  |  at process._tickCallback (internal/process/next_tick.js:188:7) name: 'TimeoutError' }
// END OF TRACE


Please provide any additional information below. Attach a screenshot if
possible.
I've written a very detailed issue on the official repository of Puppeteer but I'm not sure if the issue is related to Headless Chrome or just the package itself since the issue is not present on my development computer but only on the production server running Docker on Ubuntu server. All the information are included in my issue.
https://github.com/GoogleChrome/puppeteer/issues/3599

Regards,
Žiga

 
I will keep the issue on GitHub always up-to-date with what will I try or find out.
Labels: Needs-Triage-M72
Today I built Chromium from `master` (7b80508b616a53b5b4f69f2bda3a3064f28c9ce2) for usage inside AWS Lambda and I see the similar behaviour on pages with WebGL: networkidle0 never fires if page has WebGL.

Here are all my options:

'--disable-dev-shm-usage',
'--no-zygote',
'--disable-gpu',
'--hide-scrollbars',
'--mute-audio',
'--no-sandbox',
'--single-process',

Sign in to add a comment