[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
This commit is contained in:
Rachel Shen 2023-10-12 15:53:58 -06:00 committed by GitHub
parent 679716d0b1
commit 33207e3e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,6 +167,7 @@ export class HeadlessChromiumDriverFactory {
TZ: browserTimezone,
},
headless: 'new',
protocolTimeout: 0,
});
} catch (err) {
observer.error(