# Reporting Diagnostics tool fails on capture screenshot

**URL:** https://discuss.elastic.co/t/reporting-diagnostics-tool-fails-on-capture-screenshot/330080
**Category:** Kibana
**Created:** [April 16, 2023, 8:25am UTC](https://discuss.elastic.co/t/reporting-diagnostics-tool-fails-on-capture-screenshot/330080 "2023-04-16T08:25:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sblack](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sblack](https://discuss.elastic.co/u/sblack)
#### Post date: [April 16, 2023, 8:25am UTC](https://discuss.elastic.co/t/reporting-diagnostics-tool-fails-on-capture-screenshot/330080/1 "2023-04-16T08:25:47Z")

</div>

I ran the Reporting Diagnostics tool and after sometime, the following error is displayed:

> **Something isn't working properly.**  
> There was a problem running the diagnostic: Error

For additional debugging information, I ran Kibana with Puppeteer logs:

```auto
sudo env DEBUG="puppeteer:*" ./bin/kibana --allow-root

```

The following error is shown:

```auto
[2023-04-16T07:32:28.292+00:00][ERROR][plugins.screenshotting] Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid InterceptionId.

```

There are a number of these errors reported prior to timeout. There are no other errors reported before this.

Then the request times-out with (I have truncated the full stacktrace):

```auto
[2023-04-16T07:34:27.806+00:00][ERROR][plugins.screenshotting] Error: Screenshotting encountered a timeout error: "open URL" took longer than 120 seconds. You may need to increase "xpack.screenshotting.capture.timeouts.openUrl" in kibana.yml.
at /usr/share/kibana/x-pack/plugins/screenshotting/server/screenshots/observable.js:110:73
    at Observable.pipe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:79:48)
    at ScreenshotObservableHandler.openUrl (/usr/share/kibana/x-pack/plugins/screenshotting/server/screenshots/observable.js:129:8)
    at ScreenshotObservableHandler.setupPage (/usr/share/kibana/x-pack/plugins/screenshotting/server/screenshots/observable.js:169:17)
    at /usr/share/kibana/x-pack/plugins/screenshotting/server/screenshots/index.js:75:98
...
[2023-04-16T07:34:27.813+00:00][ERROR][plugins.screenshotting] TimeoutError: Navigation timeout of 120000 ms exceeded
   at LifecycleWatcher._LifecycleWatcher_createTimeoutPromise (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/LifecycleWatcher.js:167:12)
[2023-04-16T07:34:27.829+00:00][ERROR][plugins.screenshotting] ProtocolError: Protocol error (Emulation.setDeviceMetricsOverride): Target closed.
    at /usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:329:24
    at new Promise (<anonymous>)
    at CDPSessionImpl.send (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:325:16)
    at EmulationManager.emulateViewport (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/EmulationManager.js:36:73)
    at CDPPage.setViewport (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1707:96)
    at HeadlessChromiumDriver.setViewport (/usr/share/kibana/x-pack/plugins/screenshotting/server/browsers/chromium/driver.js:297:21)
    at resizeViewport (/usr/share/kibana/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.js:34:17)
    at getScreenshots (/usr/share/kibana/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.js:63:13)
    at /usr/share/kibana/x-pack/plugins/screenshotting/server/screenshots/observable.js:203:56
    at doInnerSub (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:22:31)
    at outerNext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:17:70)
    at OperatorSubscriber._this._next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at OperatorSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
    at Observable._subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js:109:24)
    at Observable._trySubscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31
    at Object.errorContext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/catchError.js:17:31
    at OperatorSubscriber._this._error (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:43:21)
    at OperatorSubscriber.Subscriber.error (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at OperatorSubscriber.Subscriber._error (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at OperatorSubscriber.Subscriber.error (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at OperatorSubscriber.Subscriber._error (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at OperatorSubscriber.Subscriber.error (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at Observable.init [as _subscribe] (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/observable/throwError.js:8:58)
    at Observable._trySubscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31
    at Object.errorContext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/timeout.js:38:25
    at AsyncAction.<anonymous> (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js:8:9)
    at AsyncAction._execute (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js:76:18)
    at AsyncAction.execute (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js:64:26)
    at AsyncScheduler.flush (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js:39:33)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
[2023-04-16T07:34:27.837+00:00][ERROR][plugins.screenshotting.browser-driver] Error: Protocol error (Performance.getMetrics): Session closed. Most likely the page has been closed.
    at CDPSessionImpl.send (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:316:35)
    at Object.kill (/usr/share/kibana/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.js:167:51)
    at /usr/share/kibana/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.js:204:24
    at execFinalizer (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscription.js:172:9)
    at OperatorSubscriber.Subscription.unsubscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscription.js:89:29)
...

```

## Environment

Elastic/Kibana version: `8.5.3`  
OS: `CentOS Linux release 7.5.1804 (Core)`

Kibana is connected via a proxy (Nginx) over https, but I have configured reporting to use http with:

```auto
xpack.reporting.kibanaServer.port: 5601
xpack.reporting.kibanaServer.protocol: http
xpack.reporting.kibanaServer.hostname: monitor.mydomain.com

```

Have increased the timeout to `2m`:

```auto
xpack.screenshotting.capture.timeouts.openUrl: 2m

```

Other relevant configuration:

```auto
server.host: "0.0.0.0"
server.publicBaseUrl: "http://monitor.mydomain.com"
server.ssl.enabled: false
server.name: "monitor.mydomain.com"

```

The reverse proxy SSL cert is a self-signed cert.

Is this error an indication of misconfiguration of the `xpack.reporting.kibanaServer.*` properties?

The closest I have found on this specific error is [this SO post](https://stackoverflow.com/questions/68383589/error-protocol-error-fetch-continuerequest-invalid-interceptionid), and poster had solved their own issue by fixing invalid resources (presumably invalid URLs). So I suspect it is something to do with the reverse proxy configuration.

Regards,  
Simon

---

<div class="post-metadata">

### Author: ![sblack](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sblack](https://discuss.elastic.co/u/sblack)
#### Post date: [April 23, 2023, 10:59pm UTC](https://discuss.elastic.co/t/reporting-diagnostics-tool-fails-on-capture-screenshot/330080/2 "2023-04-23T22:59:32Z")

</div>

Update:

I have tried the following with no further success:

- Disabled SE Linux.
- Enabled NGINX to support just `http`.
- Made sure the the executable `/usr/share/kibana/x-pack/plugins/screenshotting/chromium/headless_shell-linux_x64/headless_shell` is owned by `kibana`.

But I am now getting a different error in Kibana: `Gateway Time-out`

When running with puppeteer debugging, still seeing the `Protocol error (Fetch.continueRequest): Invalid InterceptionId.` error.

Appreciate any other suggestions.

Regards,  
Simon

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 21, 2023, 11:00pm UTC](https://discuss.elastic.co/t/reporting-diagnostics-tool-fails-on-capture-screenshot/330080/3 "2023-05-21T23:00:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
