Skip to content

Commit

Permalink
[Reporting] Add protocolTimeout to screenshotting plugin (elastic#167335
Browse files Browse the repository at this point in the history
)

## 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
  • Loading branch information
rshen91 authored Oct 12, 2023
1 parent 679716d commit 33207e3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export class HeadlessChromiumDriverFactory {
TZ: browserTimezone,
},
headless: 'new',
protocolTimeout: 0,
});
} catch (err) {
observer.error(
Expand Down

0 comments on commit 33207e3

Please sign in to comment.