[Reporting] Chromium wait until domcontentloaded not networkidle0 (#23586)

Kibana now keeps a constant connection between the browser and the
server from Canvas's websocket. When there's a reverse proxy between the
server and the browser, the fallback is XHR polling. This open polling
connection was keeping the network alive all the time, never idle, which
resulted in the Chromium browser driver kept waiting. Eventually, the
Report job would fail with a timeout error.
This commit is contained in:
Tim Sullivan 2018-10-02 06:57:14 -07:00 committed by GitHub
parent 52723502bc
commit 8d02866321
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ export class HeadlessChromiumDriver {
this.logger.debug(`HeadlessChromiumDriver:opening url ${url}`);
await this.page.setExtraHTTPHeaders(headers);
await this.page.goto(url, { waitUntil: 'networkidle0' });
await this.page.goto(url, { waitUntil: 'domcontentloaded' });
await this.page.waitFor(waitForSelector);
}