From 33207e3e661b0fdb5549e54f757617734d5624ff Mon Sep 17 00:00:00 2001 From: Rachel Shen Date: Thu, 12 Oct 2023 15:53:58 -0600 Subject: [PATCH] [Reporting] Add protocolTimeout to screenshotting plugin (#167335) ## Summary Timeout settings for the screenshotting plugin that uses puppeteer is facing an issue where the connection is closed too quickly for reporting to work. Test this fixes the protocolTimeout puppeteer with example plugin and modifying the x-pack/examples/reporting_example/public/containers/main.tsx useEffect. ```jsx useEffect(() => { Rx.timer(22000) .pipe(takeWhile(() => logos.length < sourceLogos.length)) .subscribe(() => { setLogos([...sourceLogos.slice(0, logos.length + 1)]); }); }); ``` and then modifying the kibana.yml to `xpack.reporting.capture.timeouts.openUrl: 200000s` The report waits for all cards to load before capturing the screenshot --- .../server/browsers/chromium/driver_factory/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts index 53f0fd5d642b5..ce8b8a3a209d9 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts @@ -167,6 +167,7 @@ export class HeadlessChromiumDriverFactory { TZ: browserTimezone, }, headless: 'new', + protocolTimeout: 0, }); } catch (err) { observer.error(