From 8d028663216e81179871af672c84af44d5e46de8 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Tue, 2 Oct 2018 06:57:14 -0700 Subject: [PATCH] [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. --- .../server/browsers/chromium/driver/chromium_driver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts index ea90e8bf8316..c419cae26340 100644 --- a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts +++ b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts @@ -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); }